Download the PHP package ngmy/okuribito-laravel without Composer
On this page you can find all versions of the php package ngmy/okuribito-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ngmy/okuribito-laravel
More information about ngmy/okuribito-laravel
Files in ngmy/okuribito-laravel
Package okuribito-laravel
Short Description OkuribitoLaravel can monitor view loading and record it. This helps to remove unused view files.
License MIT
Informations about the package okuribito-laravel
OkuribitoLaravel
OkuribitoLaravel can monitor view loading and record it. This helps to remove unused view files.
This package is inspired by Ruby's Okuribito gem.
Requirements
OkuribitoLaravel has the following requirements:
- PHP >= 7.1.3
- Laravel >= 5.5
Installation
Execute the require
Composer command:
This will update your composer.json
file and install this package into the vendor
directory.
Migration
Execute the migrate
Artisan command:
This will create the view_load_logs
table in your database.
Publishing Configuration
Execute the vendor:publish
Artisan command:
This will publish the configuration file to the config/ngmy-okuribito-laravel.php
file.
You can also use the tag to execute the command:
You can also use the service provider to execute the command:
Basic Usage
Update the config/ngmy-okuribito-laravel.php
file's monitor_views
option to the view you want to monitor loading:
You can also specify multiple views:
You can also use a wildcard:
This value is specified in the same format as the first argument of Laravel's View::composer
method.
When the specified view is loaded, it is recorded to the view_load_logs
table in your database.
You have other options available. See the config/ngmy-okuribito-laravel.php
file for details.
Advanced Usage
Customizing Record Method
Creating your implementation of the ViewLoadLogRepositoryInterface
interface.
Binding the ViewLoadLogRepositoryInterface
interface to your implementation in your service provider's register
method.
License
OkuribitoLaravel is open-sourced software licensed under the MIT license.