Folder structure when Lumen With Angularjs?
I would like to develop a web application using Lumen
and AngularJs
. I have a folder app
that contains all the AngularJs
files, which means the client application is inside the folder app
.
But I found two folders to view in Lumen
, this public
and resource
. all view files specified in the folder resource
and all assets
such as js
, images
etc. are in the shared folder.
How can I bring everything to a specific place, either publicly or a resource.
Please explain if there is good practice in case of folder structure?
If I use both folder public
and resource
, is it good practice?
source to share
These folders have a different purpose. The folder resources
will display your views. Lumen will grab them, perform any necessary functions, then display them.
The shared folder will be where you will place your assets (images, css, javascript, etc.). You must set this folder as the root of your document on your web server.
The views themselves that are in resources/views
should not be directly accessible to any user on the network, there should be a public folder. Although, you probably won't be using this folder anymore because you are using Angular, so most of your html will be available in the shared folder that Angular will access.
source to share
I am late to the party but I totally agree with user3158900
You can find a structuring example for the AngularJS and Lumen project at ( http://bowyer.colorgap.com ), the code is available on Github.
source to share