Laravel Blade : What does it mean the double column in parameter in @extends('adminlte::page')

邮差的信 提交于 2019-12-04 05:24:40

问题


I want to use this Admin Panel : https://github.com/jeroennoten/Laravel-AdminLTE

But i don't understand this syntax : @extends('adminlte::page'). The page is a view but what does it mean to add adminlte and the double column in this example ?

I have never seen this syntax, and i didn't find about it in the Laravel blade docs, can anyone enlighten me please ?


回答1:


This is used to identify the package from which the view should be loaded from. For example you have a package named neokyuubi/courier inside your vendor folder, and you want to load views from there into the application. Then you would use courier::index to identify your view. if you use @import('index') the framework will look into resources\views\index.blade.php but when you write your package before the view name, it'll look first to resources\views\vendor\courier\index.blade.php and when it doesn't find the view, it'll look for your package views directory.

But, you need to register your views like this first inside your package's service provider:

$this->loadViewsFrom("path\to\your\view\folder", "courier");

For more information: https://laravel.com/docs/5.7/packages#views



来源:https://stackoverflow.com/questions/53189652/laravel-blade-what-does-it-mean-the-double-column-in-parameter-in-extendsad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!