Modane
Modane

Reputation: 111

Is possible to use Atomic Design in PHP Laravel Blade?

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?

Upvotes: 0

Views: 377

Answers (1)

Harry
Harry

Reputation: 326

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)

Upvotes: 0

Related Questions