Laravel Blade:@extends('adminlte :: page')中的参数中的双列表示什么意思 [英] Laravel Blade : What does it mean the double column in parameter in @extends('adminlte::page')
问题描述
我想使用此管理面板: https://github.com/jeroennoten/Laravel-AdminLTE
I want to use this Admin Panel : https://github.com/jeroennoten/Laravel-AdminLTE
但是我不理解这种语法:@extends('adminlte::page')
.
该页面是一个视图,但是在此示例中添加adminlte和double列是什么意思?
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 ?
我从未见过这种语法,并且在Laravel刀片文档中也没有找到它,有人能启发我吗?
I have never seen this syntax, and i didn't find about it in the Laravel blade docs, can anyone enlighten me please ?
推荐答案
这用于标识应从中加载视图的包.例如,您的供应商文件夹中有一个名为neokyuubi/courier
的软件包,并且您想要从那里将视图加载到应用程序中.然后,您将使用courier::index
标识您的视图.如果您使用@import('index')
,则框架将查看resources\views\index.blade.php
,但是当您在视图名称之前编写程序包时,它将首先查看resources\views\vendor\courier\index.blade.php
,而在找不到视图时,它将查找您的视图.包查看目录.
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");
有关更多信息: https://laravel.com/docs/5.7/packages#views
这篇关于Laravel Blade:@extends('adminlte :: page')中的参数中的双列表示什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!