Hey guys!
I'm working with Laravel on a project, and a question arose to me even being (idiot). I have structured all my controllers, models and views, but I have a view called: base.blade.php
the same idea of layout.blade.php
that comes when Laravel is installed.
In it is the whole basis of the project, and in it I inject my content, or it is in it that is the: @yield('content')
What I have to do in my view is a div that will look like the nav title and description of the alert, and click to go to the alert clicked.
And that's where the problem is, as the notifications div is in my layout.blade.php
I can not import an array and perform the foreach.
How can I make a return in my controller that is accessible by base.blade.php
? Or would I have to set a $alerts = Alert::all();
in all controllers and return to each view I create?
Print from my nav that receives alert data: link (Accessed only in my alerts view).
Error accessing any other page that uses my root view base.blade.php
link