1.

How to create & register a service provider in laravel 5?

Answer»

1. How to Create a Service Provider

php artisan make:provider CustomPostServiceProvider

After this command, a CustomPostServiceProvider.php file under the app/Providers DIRECTORY will create with TWO methods like a BOOT()and register().

2. How to register a Service Provider

To register our service provider, we need to add an entry in providers array in the config/app.php file.



Discussion

No Comment Found