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
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!
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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community