Packege creating problem.
-
Hi @tluanga,
May i know did you add your provider in the 'app.php' file.
After that, did you run 'composer dump-autoload'.
As I have made an exact same replica of your and its working fine. Please check this also.
-
-
Hi @tluanga,
Can you share with me the screenshot app.php and composer.json file?
-
-
Hi @tluanga,
Your two files seems look fine. As 404 only occurs when your route file is not loaded.
Please check your provider file boot's method if that is hitting or not. If possible then try to clear the cache also.
-
-
Hi @tluanga,
Just try to add 'dd('test');' in the boot method and check if the method is hitting or not.
public function boot() { dd('here'); // include __DIR__ . '/../Http/routes.php'; // $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'delivery'); }
and hit 'localhost/Lushai/public' only.
And share me the result.
Note: I am seeing your screenshot, If you are using '$this->loadRoutesFrom()' or 'include' path should be this "DIR . '/../Http/routes.php'"
-
-
-
Hi @tluanga,
Your 'DeliveryServiceProvider' has been successfully registered. Just check with the routes on line number 22 and 23.
public function boot() { $this->loadRoutesFrom(__DIR__ . '/../Http/routes.php'); $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'delivery'); }
OR
public function boot() { include __DIR__ . '/../Http/routes.php'; $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'delivery'); }
After that hit 'localhost/Lushai/public/delivery' or just add 'dd('test')' on your 'routes.php' to check if your route file is hiting or not.
If you see same 'test' message on the page again. Then, your route file also successfully registered. Just check with the route names or caches.