Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on directory structure #3

Open
JohnyProkie opened this issue Mar 9, 2020 · 4 comments
Open

Question on directory structure #3

JohnyProkie opened this issue Mar 9, 2020 · 4 comments

Comments

@JohnyProkie
Copy link

Hi!
Just wondering, why did you choose to have two folders in root, one for Laravel and one for CoreUI?
I like CoreUI, I was looking for admin template for personal project. I was looking for something to be built on Vue and for Laravel and without parts in DB. And of course it was supposed to be pretty and preferably free. Here is a match from the biggest part, but recently I learned I cannot deploy to Heroku with this directory structure, see part of quoted error below:

A PHP app on Heroku requires a 'composer.json' at the root of
the directory structure, or an 'index.php' for legacy behavior.

In the end, composer package with Laravel dependency would be more suitable, but maybe you encountered some issues while searching for this option?

@rakieta2015
Copy link
Contributor

Separating the frontend application from the backend application is good practice. It is used so that only one of these applications can be easy replaced, for example if there is no further support for the particular technology.
Folder with CoreUI can be easily moved to a folder containing Laravel.

@a21ns1g4ts
Copy link

Been there too! In many cases is more efficient the front-end into resource path in laravel application. If you need only one repo probably you want deploy one only app.

@LeftPinkie
Copy link

I am a little confused on the separation as well... both ./laravel and ./coreui folders have a public subfolder... but ./coreui/public does not work because it's missing ./coreui/public/js/app.js. So if you truly want to separate the "server" from the "client", shouldn't all the frontend components (like scss, css, javascripts, html, vue, etc) be moved to ./coreui and the only thing in ./laravel should be php files and the sqlite database?

@JohnyProkie
Copy link
Author

@LeftPinkie
That's what basically was my concern.
On this line, coreui gets copied to Laravel public folder anyway and blade template hangs coreui from this line, hence there's no separation at all.
In the end, I just moved coreui to laravel resources, created two directives for webpack (one for admin, one for front), and deployed to custom server anyway, to get rid of heroku limitations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants