I need help for the structure of my Laravel App.
What I want is basically this structure :
- API
- Admin panel
- Public website
I started to build this folder structure which I think is pretty correct :
app/
Http/Controllers/
API/
Back/
Front/
resources/
assets/
js/
back/
front/
sass/
back/
front/
views/
back/
front/
Problems
Elixir: How can I avoid backend's libraries or assets to be included in frontend's code and vice versa after running gulp
?
Views: How to use namespaces in Laravel views ? For example, given pages1
in views/front/
, which is extending some page2
. I want Blade to automatically search page2
inside views/front
directory when compiling (and not in views/back
for example).
Routes: How to match routes with Controller's namespaces ? I know we can do
Route::group(['domain' => 'example.com'], function() {});
And also
Route::group(['namespace' => 'Admin'], function() {});
But how to combine them ?
gulp
command, my backend's and frontend's scripts and styles are compiled in 2 files :app.css
andapp.js
. I don't want my backend's scripts available from front side... And so, what solution do you suggest for Views and Routes problems ? – David