fex-team / laravel-fis by 2betop

FIS resource loader for laravel
2,994
26
19
Package Data
Maintainer Username: 2betop
Package Create Date: 2015-07-07
Package Last Update: 2016-08-03
Language: PHP
License: MIT
Last Refreshed: 2024-11-11 15:17:11
Package Statistics
Total Downloads: 2,994
Monthly Downloads: 1
Daily Downloads: 1
Total Stars: 26
Total Watchers: 19
Total Forks: 1
Total Open Issues: 4

FEX-Team/Laravel-FIS

Laravel

适用于 Laravel 5 的 FIS 资源加载器。

Getting Started

  1. 添加依赖到 composer.json 文件中,并通过 composer update 下载下来。
"require": {
...

"fex-team/laravel-fis": "*",

...
},
  1. 添加 Provider 到 config/app.php 配置项中。
'providers' => [

  /*
   * Laravel Framework Service Providers...
   */
  'Illuminate\Foundation\Providers\ArtisanServiceProvider',
  'Illuminate\Auth\AuthServiceProvider',

  // ...

  // 添加 FIS 的 Provider
  'Fis\Providers\ResourceProvider',

],

  1. 如果你想更直接的使用 FIS Facades 的话,请添加 aliases。同样是 config/app.php 配置项中。
'aliases' => [

  'App'       => 'Illuminate\Support\Facades\App',
  'Artisan'   => 'Illuminate\Support\Facades\Artisan',

  // ...

  'Fis'       => 'Fis\Facades\Fis',
],
  1. 默认 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'))

Change Log

2015/07/13 发布 1.0 版本