renedekat / laravel-view-finder-creater
A Laravel view finder replacement that creates missing views with a template layout.
Requires
- php: ~5.6|~7.0
- laravel/framework: 5.4.*
Requires (Dev)
- phpunit/phpunit: ^5.3.0
This package is not auto-updated.
Last update: 2024-10-12 20:39:02 UTC
README
Laravel View Finder that creates missing view files
By default Laravel throws an error when a view file cannot be found. This package replaces the default view finder, and creates your missing view files on the fly, based on a template.
The default template can be found in resources/assets/pages/missing.blade.php after you've published it.
Installation
Via Composer
$ composer require renedekat/laravel-view-finder-creater --sort-packages
Replace the default ViewServiceProvider
// config/app.php 'providers' => [ ... //Illuminate\View\ViewServiceProvider::class, ReneDeKat\LaravelViewFileFinder\ViewServiceProvider::class, ];
Or, if you only want to use it locally (handy during development)
// config/app.php 'providers' => [ ... //Illuminate\View\ViewServiceProvider::class, ];
// app/Providers/AppServiceProvider public function register() { ... if ('local' == $this->app->environment()) { $this->app->register(\ReneDeKat\LaravelViewFileFinder\ViewServiceProvider::class); } else { $this->app->register(\Illuminate\View\ViewServiceProvider::class); } ... }
The missing page template file must be published with this command:
php artisan vendor:publish --provider="ReneDeKat\LaravelViewFileFinder\ViewServiceProvider" --tag="assets"
It will be published in resources/assets/pages/missing.blade.php
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email renedekat@9lives-development.com instead of using the issue tracker.
Credits
- [René de Kat][https://github.com/renedekat]
License
The MIT License (MIT). Please see License File for more information.