Is possible to use Atomic Design in PHP Laravel Blade?

274 Views Asked by At

In React, you can create separate components in folders, which have their own JS and CSS. In Laravel I saw the possibility of using @includes(), @extends(), @yarn(), and @section() sending parameters to edit the internal content and simulate react, but in relation to dependencies (css and js), these are not allocated in the correct positions on the blade. How can I resolve this?

1

There are 1 best solutions below

0
Harry On

Your questions isn't extremely clear, but assuming my understanding of your question, here is one of the possibility.

  1. You create the following blade structures:
|---- View
       |----- Inc
               |--- header.blade.php
               |--- footer.blade.php
       |--- main.blade.php

Now, within your main.blade.php

@include('inc.header')

 // all your main content here

@include('inc.footer)