I would like assistance with calling a global variable on Laravel app for specific pages or routes.
This is my current code which works on login
App\Providers\AppServiceProvider
public function boot()
{
view()->composer(['auth.login'], function ($view) {
$view->with('settings', AppSetting::where('id',1)->first());
});
}
This is the route for the login page
Route::get('/', function () {
return view('auth.login');
});
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/38bdZel
via IFTTT
Aucun commentaire:
Enregistrer un commentaire