I want to create my own Laravel 5.5 Package, I put them in /packages/myvendor/mypackage
. Is there any way to make Laravel Package Auto-Discovery seen my packages without adding MyServiceProvider::class
to config/app.php
?
Laravel's filesystem configuration file is located at config/filesystems.php .
The Routes Directory By default, several route files are included with Laravel: web.php , api.php , console.php , and channels.php . The web.php file contains routes that the RouteServiceProvider places in the web middleware group, which provides session state, CSRF protection, and cookie encryption.
All of the configuration files for the Laravel framework are stored in the app/config directory. Each option in every file is documented, so feel free to look through the files and get familiar with the options available to you. Sometimes you may need to access configuration values at run-time.
Laravel's Vendor directory The vendor directory contains the composer dependencies, for example, to install Laravel setup, the composer is required. The vendor folder contains all the composer dependencies.
I found the solution! I add my local packages to composer.json with
"repositories": [
{
"type": "path",
"url": "packages/vendor/package",
"options": {
"symlink": true
}
}
]
Then require my package with composer require vendor/package:dev-master
. Then laravel will auto discover my package
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With