echowine / laravel-app
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/echowine/laravel-app
This package is not auto-updated.
Last update: 2025-09-28 05:46:22 UTC
README
A simple loader that permits to split the project in multiple parts or even create multiple application. All the basic functions of laravel will be automatically loaded: Commands, Resources/views, Resources/public, routes, Exceptions/Handler, Providers
Installation
- Add the package and the folder psr-4 to your
composer.json
and runcomposer update
.
{ "require": { "echowine/laravel-app": "*@dev" }, "autoload": { "psr-4": { "": "src/" } }, }
- Add the service provider to the
providers
array inconfig/app.php
EchoWine\Laravel\App\AppServiceProvider::class,
- Replace "HandlerException in app/Exceptions/Handler" (Only laravel 5.3 +)
use EchoWine\Laravel\App\Exceptions\Handler as ExceptionHandler;
Usage
- Create a new src package folder with
php artisan src:generate Example
at the root of your project.
Return view
return view('Example::index');
Assets
{{asset('src/Example/assets/welcome/main.css')}}
Exception Handler (Only laravel 5.3 +)
public function report(Exception $exception) { # Report only if it's a custom report # echo "A custom report"; } public function render($request, Exception $exception) { # Return only if it's a custom render # The first handler with a return in render method will be used # return parent::render($request, $exception); }