armandsar/laravel-quick-view
Composer 安装命令:
composer require armandsar/laravel-quick-view
包简介
Quickly render view from controller without typing file names
README 文档
README
Are you tired of typing out view name for your controllers? Then this package is for you!
Install
Via Composer
$ composer require armandsar/laravel-quick-view
Usage
Namespace and controller name as folders and method name as file name.
Given that we have a Admin/UsersController
public function create() { return quick(); }
would assume a view at admin/users/create.blade.php
Or if you prefer not to use a helper, there is also a trait:
class UsersController { use Armandsar\QuickView\Quick; public function show($id) { $user = User::findOrFail($id) return $this->quick(['user' => $user]); } }
would assume a view at admin/users/show.blade.php
Testing
$ phpunit
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 271
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-06