Recent Topics

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.
    bf8d44e0-8f6e-44a2-b25b-0d0e037e0027-image.png
    6c4a9780-ce6a-44e3-920e-6c7cbb26f448-image.png
    8924704e-0dbf-44b8-8c09-74d1e21dfff2-image.png
    92fbde92-02df-4c95-9cd3-45e361234263-image.png



  • Hi @tluanga,

    May i know did you add your provider in the 'app.php' file.

    Screenshot from 2020-08-04 14-04-11.png

    Screenshot from 2020-08-04 14-04-16.png

    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:
    Screenshot from 2020-08-04 14-09-32.png

    Step 2:
    Screenshot from 2020-08-04 14-09-03.png

    Step 3:
    Screenshot from 2020-08-04 14-10-02.png

    Final Result:
    Screenshot from 2020-08-04 14-10-42.png



  • @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,
    f160d24c-748f-4389-b20d-caf917ef4481-image.png



  • Hi @tluanga,

    Can you share with me the screenshot app.php and composer.json file?



  • @devansh419 Sure..
    app.php
    26529859-b16d-4f92-88af-2f5527b7f4a9-image.png

    composer.json
    c42b10d4-c58a-4112-9880-c0f816ce96dd-image.png



  • 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,
    e4810e2b-b1e7-41bd-91cb-db839996f29f-image.png
    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,
    bf959074-f458-40c9-9c40-42f2cda751d0-image.png



  • 4a223216-5ebf-4259-9943-1e79178e8cf6-image.png



  • 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.


Log in to reply