S
S
sdgs4s4 .2018-08-27 21:12:42
Laravel
sdgs4s4 ., 2018-08-27 21:12:42

Laravel blade templating engine - connect your controller?

Hello everyone
Is it possible to connect your controller to the layouts-name.blade template?
To register another time only include, add it to all pages of the site (for example, take footer.blade) and so that you don’t have to go into each model for each page of the site and register all changes
there

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin B., 2018-08-28
@Kostik_1993

It's not entirely clear what you want, but I'll assume that you need a View Composer
Well, if you really want widgets, then here's https://github.com/arrilot/laravel-widgets

S
Sergey Krivosheev, 2018-08-28
@Nemozar

Laravel has
@include('layouts.article', ['mainTitle' => "404, page not found", 'mainContent' => "sorry, but the requested page does not exist :("])
or alternatively use arrilot/laravel-widgets, but it's not very comfortable to use, because if a complex widget is very monstrous

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question