auto load header menu data to each page |
You want to autoload this model inside your BaseController.php Then you get the data into a class property so you can access it in all your controllers that extend to BaseController.php.
Something like: PHP Code: $model = new ArticleModel(); Then in your controllers you just send the data into your views. PHP Code: return view('foo', $this->data);
Website: marcomonteiro.net | Blog: blog.marcomonteiro.net | Twitter: @marcogmonteiro | TILThings: tilthings.com
|
Messages In This Thread |
auto load header menu data to each page - by cilux - 07-20-2020, 05:59 AM
RE: auto load header menu data to each page - by marcogmonteiro - 07-20-2020, 06:28 AM
RE: auto load header menu data to each page - by cilux - 07-20-2020, 06:42 AM
RE: auto load header menu data to each page - by kilishan - 07-20-2020, 06:50 AM
RE: auto load header menu data to each page - by marcogmonteiro - 07-20-2020, 10:45 AM
|