Modularizing your Laravel Application in a very simple way - Laravel 8
Вставка
- Опубліковано 18 вер 2024
- 👨💻 Check out the discounted, early-release version of my test-driven development course: tddwithlaravel...
👨💻 Sign up to my newsletter and receive PHP, JS and Laravel news in a weekly-basis:
subscribe.mate...
🎉 Party up:
/ mateusjatenee
/ mateusjatenee
/ mateusguimaraes
Thanks for watching!
Great content! I'm self educated person, now im 22 and i just became team lead. This event rised a lot of questions about good code and test driven development in my head and i found your channel just in time! Thank you
Glad I helped man, thanks for watching
How did u learn tdd please send resources
AdiL IsmaiL there are several videos on my channel
The concept of modularization and keeping code separate is awesome. Many thanks for this beautiful insight.
Oh wow, this is similar to how I used to arrange sites in CodeIgniter using a rough HMVC extension about a billion years ago. Never realized it could be done to such an extent so easily in Laravel specifically with the routes and view subfolders. Lots of magic in those Service Providers! :) Thanks! Woo hoo!
This is basically how you develop packages for Laravel.
yes, it's similar, but just because in both cases they're in another namespace. Service providers are useful for many things including packages
its very cool structure. i reorganize my admin according to you and its very scalable and seperated. Thanks.
It's really awesome concept
Very insightful 💡 thanks for great content Mateus
My pleasure!
Thank you.
This help me a lot.
I developed a web app that need to separate and simple web and a dashboard because like you said it's become hard to find a specific file when the application begin to had more file and.
Thank you
Thanks for watching!
Impressive video!!!
Nwi dart module is awesome
Amazing .. Wooww so glad .. I wish your tutorial goes on and on .. Not just for 30 days
Thank You.. Its very helpful for me.. amazing video
This is a very useful tutorial. But, what if you need to also load the assets from that "Dashboard" project outside the app? Like, creating a public/assets folder that has inside the "js", "css", "images" folders... How can we load those assets from within "Dashboard" project?
Hey that's pretty cool it make ADR possible on Laravel
Kindly work with react and laravel to implement a modular monolith
That's one why I love Django.
Thanks it was very useful
Thank you for this video. Good luck
good tutorial, now how can we add livewire components, inside the view Dashboard folder?
What folder icons are you using in vscode ?
question how do i apply css/js from a module or load css/js not from public but from the module views/css
Nice tutorial. What if we want to bring in migrations seeders etc into the modules?
Hey Christian,
You can use the `$this->loadMigrationsFrom(__DIR__.'/path')` method inside the boot() on your service provider to load migrations :-)
For seeders, as the autoloading is already set up, you can use them just fine either in database/seeders or in your module.
@
Wow never knew about all these methods.. Where can I go to see more advanced info like this? What else can I load with $this->loadFrom()?
@@christianosueke7523 :-)
I suggest you go to `Illuminate\Support\ServiceProvider` and check things yourself!
There's also the API with all of the available methods: laravel.com/api/8.x/index.html
@
Thanks a bunch.. I love your content.. Keep it up
is this advisable even if i develop only one application?
Hi how to add test case in module itself
Awesome!
Is there a way to do this with Jetstream with inertia stack? I am new at laravel and I've searching for this for a few days and can't find anything ={
Sure there is! Try searching for Vue Components. Exact same thing, but on Vue 🙂
Zend provides this by default... Why laravel doesn't provide this by default??
What happens when your "dashboard " and your "index" for example use the same views, or same models or functionality etc?
You can have a "Common" namespace of some sort. But if the dashboard uses different models from all over the place I'd still keep them separated.
@ I actually love the way DDD looks but I feel functionally it has flaws. I have worked on several projects that have a "common" folder or an "includes" folder but it just feels a little wrong to me as surely it breaks the whole idea of the approach and the modularity it tries to achieve. For example if I need to find a bug instead of it always being in the correct folder it now could either be in the feature folder or the common folder. I also think it introduces complexity when you use a lot of shared components. I'm actually starting to sway back to the old fashioned stick everything in one folder approach. So you have your controllers all in one folder, you have all your services in one folder and so on. I have found even on large scale projects, code editors almost always come with a very fast file search feature meaning your folder organisation really doesn't matter so long as your filenames make sense.
Thank you for your wonderful ideas and besides I couldn't help my self from getting distracted by the thought that you were teaching in a stormy weather... 🥱 🥱 😂