That's how you'd do it but what's the path that's generated?
It grabs it from the public folder path and gets the contents as shown here: https://github.com/laravel/framework/blob/5.6/src/Illuminate/Foundation/helpers.php#L582
Hi guys!
I am creating an admin panel for my website. I've created everything needed to get started (separate controllers, routes, view files), but the only thing I don't know is how to manage the assets.
I've created two separate vue projects for both the admin and the frontend, that share the same dependencies (because there is only one package.json/laravel.mix.json). I've put my admin assets in public/admin/js and public/admin/scss and my frontend assets in public/frontend /js and public/frontend /scss.
The problem: I know I can tell Mix to put my admin assets in one place and my frontend assets in another, but when using mix('js/app.js', 'admin') in blade, it cannot find mix-manifest, because it is in the public dir.
How can I tell mix to create two different manifests in two different dirs and use them. Or, If there is another approach, which is better, please share it.
Guys, I managed to figure it out. I am coming from Yii2 where you have frontend and backend directories, and everything is split. I've always created a new subdomain for the backend, which I did now as well. That's why the root was public/admin. Now I've just created a prefix 'admin' instead of a subdomain and everything works perfectly.
Thanks a lot to both of you!
Please or to participate in this conversation.