Laravel Blade View Pitfalls

Use when writing or reviewing Laravel Blade templates and the views a controller returns: components versus includes and the attribute bag (attributes->merge), scripts pushed once per response (pushOnce), props shared with nested components (aware), view composers and what they do not cover, returning a fragment for htmx or Turbo requests, escaping output for its context, passing server data to JavaScript (Js::from versus data attributes), CSRF tokens in forms, and parsing dates in a template instead of casting them on the model.

techmefr Updated

File contents

techmefr/mentis commit 93efcea1d6

Frequently asked questions

npx get-skill add techmefr/laravel-blade-view-pitfalls