I would like to call my header CSS file in every pages, so I created a function to calling the header which the code as below and this code are in BaseController.php
public function __construct()
{
Asset::container('header')
->add('style','css/style.css');
parent::__construct();
}
public function __call($method, $parameters)
{
return Response::error('404');
}
After I done the function I'm call the function at layout.blade.php with the following code.
{{ Asset::container('header')->styles() }}
But I failed to view my pages with Class 'Asset' not found.
Which part I missed or my source are not correct?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community