renedekat / laravel-view-finder-creater by renedekat

A Laravel view finder replacement that creates missing views with a template layout.
44
1
3
Package Data
Maintainer Username: renedekat
Maintainer Contact: renedekat@9lives-development.com (Rene de Kat)
Package Create Date: 2017-01-16
Package Last Update: 2017-01-18
Language: PHP
License: MIT
Last Refreshed: 2024-04-30 15:05:29
Package Statistics
Total Downloads: 44
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

Build Status StyleCI Scrutinizer Code Quality SensioLabsInsight

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.