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!

КОМЕНТАРІ • 43

  • @THE4ECHOK
    @THE4ECHOK 4 роки тому +6

    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

    •  4 роки тому

      Glad I helped man, thanks for watching

    • @adilismail3593
      @adilismail3593 3 роки тому

      How did u learn tdd please send resources

    •  3 роки тому

      AdiL IsmaiL there are several videos on my channel

  • @avecNava
    @avecNava 3 роки тому +2

    The concept of modularization and keeping code separate is awesome. Many thanks for this beautiful insight.

  • @RestlessThoughts
    @RestlessThoughts 4 роки тому +2

    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!

  • @GTCrais
    @GTCrais 4 роки тому +6

    This is basically how you develop packages for Laravel.

    •  3 роки тому

      yes, it's similar, but just because in both cases they're in another namespace. Service providers are useful for many things including packages

  • @vitaliy.artyukh
    @vitaliy.artyukh 2 роки тому +1

    its very cool structure. i reorganize my admin according to you and its very scalable and seperated. Thanks.

  • @jobayertuser
    @jobayertuser 4 місяці тому

    It's really awesome concept

  • @i_m_denny_
    @i_m_denny_ 8 місяців тому

    Very insightful 💡 thanks for great content Mateus

    •  8 місяців тому

      My pleasure!

  • @yukii_kamishiro
    @yukii_kamishiro 3 роки тому +1

    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

    •  3 роки тому

      Thanks for watching!

  • @vijayrana8133
    @vijayrana8133 2 роки тому +1

    Impressive video!!!

  • @danielray8321
    @danielray8321 Рік тому

    Nwi dart module is awesome

  • @rahulsinghchauhan7256
    @rahulsinghchauhan7256 3 роки тому

    Amazing .. Wooww so glad .. I wish your tutorial goes on and on .. Not just for 30 days

  • @ashwanisingh4547
    @ashwanisingh4547 3 роки тому

    Thank You.. Its very helpful for me.. amazing video

  • @cocoychannelcornelyu8518
    @cocoychannelcornelyu8518 Рік тому

    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?

  • @flashbangstudio9102
    @flashbangstudio9102 3 роки тому +1

    Hey that's pretty cool it make ADR possible on Laravel

  • @CodeFusionDev
    @CodeFusionDev 9 місяців тому

    Kindly work with react and laravel to implement a modular monolith

  • @mgr1282
    @mgr1282 2 роки тому

    That's one why I love Django.

  • @mohammadkhazaee9730
    @mohammadkhazaee9730 3 роки тому

    Thanks it was very useful

  • @ValeriyaPolovinkina
    @ValeriyaPolovinkina 3 роки тому

    Thank you for this video. Good luck

  • @alfalalo
    @alfalalo 2 роки тому

    good tutorial, now how can we add livewire components, inside the view Dashboard folder?

  • @AtomCoder
    @AtomCoder 2 роки тому

    What folder icons are you using in vscode ?

  • @AnonymOus-dp3jj
    @AnonymOus-dp3jj 2 роки тому

    question how do i apply css/js from a module or load css/js not from public but from the module views/css

  • @christianosueke7523
    @christianosueke7523 4 роки тому +2

    Nice tutorial. What if we want to bring in migrations seeders etc into the modules?

    •  4 роки тому +4

      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.

    • @christianosueke7523
      @christianosueke7523 4 роки тому +1

      @
      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()?

    •  4 роки тому +4

      @@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

    • @christianosueke7523
      @christianosueke7523 4 роки тому +1

      @
      Thanks a bunch.. I love your content.. Keep it up

  • @donpentavia4317
    @donpentavia4317 2 роки тому

    is this advisable even if i develop only one application?

  • @sakthivel-kl1ws
    @sakthivel-kl1ws 2 роки тому

    Hi how to add test case in module itself

  • @karlebh
    @karlebh 3 роки тому

    Awesome!

  • @jessicathedoc8569
    @jessicathedoc8569 3 роки тому

    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 ={

    • @mateusguimaraes-pt1250
      @mateusguimaraes-pt1250 3 роки тому

      Sure there is! Try searching for Vue Components. Exact same thing, but on Vue 🙂

  • @SandeepKumar-yv8jj
    @SandeepKumar-yv8jj 3 роки тому +1

    Zend provides this by default... Why laravel doesn't provide this by default??

  • @MrOldham101
    @MrOldham101 3 роки тому

    What happens when your "dashboard " and your "index" for example use the same views, or same models or functionality etc?

    •  3 роки тому

      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.

    • @MrOldham101
      @MrOldham101 3 роки тому

      @ 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.

  • @jdrgyshssksleb
    @jdrgyshssksleb 2 роки тому

    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... 🥱 🥱 😂