From a50d2e85659d55229e195d5cb64fd749a3fb5cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agli=20Pan=C3=A7i?= Date: Wed, 22 Apr 2020 22:10:17 +0200 Subject: [PATCH] Fixing PSR-0 autoload issue (#227) * Making the controller PSR-0 Compatible * Update composer.json * Dynamic base controller * Update LogViewerController.php * Dependency class namespace fix * Changing the package name back after testing * Updating documentation --- README.md | 2 +- src/controllers/BaseController.php | 9 +++++++++ src/controllers/LogViewerController.php | 9 ++------- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 src/controllers/BaseController.php diff --git a/README.md b/README.md index 4505ee2..075ba36 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ $app->register(\Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::cl Explicitly set the namespace in `app/Http/routes.php`: ```php -$router->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function() use ($router) { +$router->group(['namespace' => '\Rap2hpoutre\Controllers'], function() use ($router) { $router->get('logs', 'LogViewerController@index'); }); ``` diff --git a/src/controllers/BaseController.php b/src/controllers/BaseController.php new file mode 100644 index 0000000..37e1ef6 --- /dev/null +++ b/src/controllers/BaseController.php @@ -0,0 +1,9 @@ +