Packege creating problem.
-
Trying to make a new package i follow all the following steps i.e(step1-step9), but i got no result on the page URL that ive enter.
-
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.
Step 1:
Step 2:
Step 3:
Final Result:
-
@devansh419 Thanks for replying my post, i do add provider in app.php and run (composer dump-autoload), it look exactly same as i did but i got the same result (404 page not found),
here's my delivery.blade.php it look exactly same,
-
Hi @tluanga,
Can you share with me the screenshot app.php and composer.json file?
-
@devansh419 Sure..
app.php
composer.json
-
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.
-
@devansh419 thanks for reply,
here's DeliveryServiceProvider.php file,
i change the namespace here, does this make an error. -
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'"
-
@devansh419 Heres the result,
-
-
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.