fex-team / laravel-fis
FIS resource loader for laravel
Installs: 2 995
Dependents: 0
Suggesters: 0
Security: 0
Stars: 26
Watchers: 19
Forks: 1
Open Issues: 4
Requires
- php: >=5.4.0
- illuminate/support: 4.2.x|~5.0
This package is not auto-updated.
Last update: 2024-12-15 07:27:29 UTC
README
适用于 Laravel 5 的 FIS 资源加载器。
- 关于前端编译部分,请查看fis3 laravel 脚手架。
- 关于本模块功能扩展,请查看 功能说明
Getting Started
- 添加依赖到
composer.json
文件中,并通过composer update
下载下来。
"require": {
...
"fex-team/laravel-fis": "*",
...
},
- 添加 Provider 到
config/app.php
配置项中。
'providers' => [ /* * Laravel Framework Service Providers... */ 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', // ... // 添加 FIS 的 Provider 'Fis\Providers\ResourceProvider', ],
- 如果你想更直接的使用 FIS Facades 的话,请添加 aliases。同样是
config/app.php
配置项中。
'aliases' => [ 'App' => 'Illuminate\Support\Facades\App', 'Artisan' => 'Illuminate\Support\Facades\Artisan', // ... 'Fis' => 'Fis\Facades\Fis', ],
- 默认 fis 产出的
map.json
文件应该存放在resources/map
目录,如果想修改,请修改config/view.php
配置文件。
/* |-------------------------------------------------------------------------- | View Storage Paths |-------------------------------------------------------------------------- | | Most templating systems load templates from disk. Here you may specify | an array of paths that should be checked for your views. Of course | the usual Laravel view path has already been registered for you. | */ 'paths' => [ realpath(base_path('resources/views')) ], // ... // 配置 map.json 读取目录,程序运行前,请先记得用 fis 编译产出到 Laravel 项目目录。 'mapPath' => realpath(base_path('resources/map'))