定制 jacksunny/viewfinder 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jacksunny/viewfinder

Composer 安装命令:

composer require jacksunny/viewfinder

包简介

extended plugin on view file finder from view name for laravel framework

README 文档

README

extended plugin on view file finder from view name for laravel framework

How to install and configurate package

  1. install the laravel package composer require "jacksunny/viewfinder":"dev-master"

please check exist line "minimum-stability": "dev" in composer.json if failed

  1. append new service provider file line in the section providers of file app.config after appended,it should looks like
   'providers' => [
        Illuminate\Auth\AuthServiceProvider::class,
        ......
        Jacksunny\ViewFinder\ExtendedViewServiceProvider::class,  //only default view finder class
        App\Providers\MyExtendedViewServiceProvider::class,       //custom my view finder class
    ],
   
  1. add test code to check if it works
    Route::get("/{entity}/{type}",function($entity,$type){
      return view("$entity.$type");
  });
  
  1. if wanna custom your ViewFinder you may create a class extends from AbsExtendedFileViewFinder,and a custom service provider extends from ExtendedViewServiceProvider
    class MyExtendedFileViewFinder extends AbsExtendedFileViewFinder {
    
     public function findNeededFilesInPath($name, $path, $user) {
       ...
     }
     
     class MyExtendedViewServiceProvider extends ExtendedViewServiceProvider {
     public function registerViewFinder() {
         $this->app->bind('view.finder', function ($app) {
             return new MyExtendedFileViewFinder($app['files'], $app['config']['view.paths']);
         });
     }
     
  2. please notify me if you got any problem or error on it,thank you!

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固