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

断了今生、忘了曾经 提交于 2019-12-02 06:00:46

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

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