marconi1992 / hypernova-blade-directive
此软件包最新版本(1.2.0)没有可用的许可证信息。
1.2.0
2019-10-25 14:48 UTC
Requires
- illuminate/support: ^5.8|^6.0
This package is not auto-updated.
Last update: 2024-09-21 16:05:32 UTC
README
设置
在项目文件夹内使用Composer安装Nova Directive for Laravel Blade。
composer require marconi1992/hypernova-blade-directive
在应用配置config/app.php
中添加NovaServiceProvider
。
return [ ... 'providers': [ ... Illuminate\View\ViewServiceProvider::class, /* * Package Service Providers... */ Marconi\Nova\NovaServiceProvider::class, /* * Application Service Providers... */ App\Providers\AppServiceProvider::class, ... ] ... ]
在Laravel视图中使用Nova Directive。
在欢迎页面上添加Example
视图。
resources/views/welcome.blade.php
<html> ... <body> ... <div class="content"> <div class="title m-b-md"> Laravel </div> <!-- Nova Directive starts --> @hypernova('Example', [ 'title' => 'Ara Framework']) <!-- Nova Directive ends --> <div class="links"> <a href="https://laravel.net.cn/docs">Docs</a> <a href="https://laracasts.com">Laracasts</a> <a href="https://news.laravel.net.cn">News</a> <a href="https://blog.laravel.net.cn">Blog</a> <a href="https://nova.laravel.net.cn">Nova</a> <a href="https://forge.laravel.net.cn">Forge</a> <a href="https://github.com/laravel/laravel">GitHub</a> </div> </div> ... </body> </html>