Good day! Tell me how to implement sidebars? That is, I want to make controllers that would work out and output content on every page, regardless of the main content, and would not be tied to routes or would be tied to all at once.

I use laravel 5.4, I rummaged through all the documentation, I did not find anything like it :(

  • it is possible to implement on static methods, and it is possible as advised to take a package for widgets - Boris
  • If you want to output duplicate data for all views. You can use the View Composer out of the box. This is written in the documentation. laravel.com/docs/5.4/views#view-composers - Dmitriy Doronin

1 answer 1

Need widgets https://github.com/arrilot/laravel-widgets Insert them in the right place of the template

  • Thank you for what you need! - Dmitriy