Support the ongoing development of Laravel.io →
Configuration
Last updated 2 years ago.
0

Are you auto loading it in composer.json?

and if the path is inside the default /public directory, well that is incorrect. It should be inside /app/Site/SiteServiceProvider.php

Last updated 2 years ago.
0

Please take a look at this example on github: [https://github.com/bstrahija/l4-site-tutorial]

It does the same thing with the site map in the public folder. I don't see any thing that is missing in the code above!

Last updated 2 years ago.
0

That seems like a strange way to structure a site in my opinion. /public is usually used for css, js, site images for front-end and /app is used to build the functionality of the site with php as in back-end. I'd say he is littering the code all over the place, making the code less maintainable in the long run.

But in composer.json under classmap he is autoloading the "public/site" directory and is loading the service provider in app/config/app.php on line 118. Don't forget to use "composer dump-autoload" after changing composer.json file.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.