Structuring Laravel Projects: 2024 Edition

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 33

  • @PoweredMinecart
    @PoweredMinecart 8 หลายเดือนก่อน +11

    Always good to provide real world examples from open source projects. Gives us context on how it's used in the real world. Too often tutorials only show concepts in the abstract.

  • @kwameadoko9542
    @kwameadoko9542 8 หลายเดือนก่อน +4

    This videos are advanced Laravel tutorials. I ❤ the introductory mode .

  • @nabeelyousafpasha
    @nabeelyousafpasha 8 หลายเดือนก่อน +2

    Respect from Pakistan.
    I have sensed you are way smarter than usual course creator, you knoe how to market by solving pain points of customers.
    In this example, you will wi hearts by "just" renaming course titles along with course cointent itself.
    Povilas = Hard work and smart work.

  • @LoganathanNatarajanlogudotcom
    @LoganathanNatarajanlogudotcom 8 หลายเดือนก่อน +1

    Thanks for revisiting and really appreciated your time and loving laravel, and PHP 😍 I have been following you and you always updating things when its upgraded...

  • @pierdocks5412
    @pierdocks5412 8 หลายเดือนก่อน +1

    Great update, this makes your courses priceless! Thank you...

  • @dave1790
    @dave1790 8 หลายเดือนก่อน +2

    Love that the courses are being updated but I'll miss the video courses

    • @LaravelDaily
      @LaravelDaily  8 หลายเดือนก่อน +4

      I will still continue videos here on TH-cam. With courses, there's a tradeoff: if I continue with video courses, then I will release 2x fewer courses and most of them would be not updated from Laravel 8/9.

    • @dave1790
      @dave1790 8 หลายเดือนก่อน +3

      @LaravelDaily I completely agree with the rational, it makes perfect sense. If I'm being honest I think I learn more from the written courses as they seem to be more information dense

  • @JJ15ASMR
    @JJ15ASMR 8 หลายเดือนก่อน +2

    Text courses are definitely the way to go. I like the fact that when I run into an issue or am confused about something, I'll remember it was talked about in the course and with it being text, I can easily go back and find it. With videos, not so much. On the same topic, maybe it'd be possible to add a "Search within Course" feature to LD? Great work as always, Povilas and team!

    • @LaravelDaily
      @LaravelDaily  8 หลายเดือนก่อน

      Hm, interesting proposal. We have a general global search but it works pretty poorly for such cases. Could you give an example of a query string for this case, and for which specific course? We would brainstorm from there.

    • @JJ15ASMR
      @JJ15ASMR 8 หลายเดือนก่อน

      @@LaravelDaily By "query string" I assume you mean a keyword that you can search for within an existing course for testing purposes? 🙂If so, "artisan" within "[NEW] How to Structure Laravel 10 Projects" should be good as it's mentioned quite a few times (both in text and code blocks).

  • @andriusgeciauskas3154
    @andriusgeciauskas3154 8 หลายเดือนก่อน +1

    Aciu Povilai tavo video labai isskirtiniai bei daug ko pamokantys. taip ir toliau :)

  • @jacquesmatike9289
    @jacquesmatike9289 7 หลายเดือนก่อน

    This is the way I structure: from routes, going to controllers.
    Controller have to do something then I call action class always with DTO as parameters (UserDtoFactory::from_request())
    Action class is the main executor, it can call other actions, but call also service class which is responsible for some computations.
    Action always have try catch block which throws custom ActionnameException (there’s an error executing user creation)
    To handle db, I use a class called Repository which has two methods.
    command() which returns an instance of Command, queries() which return instance of Queries
    Both class have methods to deals with Eloquent commands and queries.
    If tomorrow I want to use another db, I just create two other classes Command and Query with same methods like other (helped by interface)

    • @jacquesmatike9289
      @jacquesmatike9289 7 หลายเดือนก่อน

      It takes time to setup, especially DTO and their factories. But when it is done, I can go fast.
      I also want to use viewModel for response, but tired 😅

    • @jacquesmatike9289
      @jacquesmatike9289 7 หลายเดือนก่อน

      If possible to do a quick review I can share M. Povilas

    • @LaravelDaily
      @LaravelDaily  7 หลายเดือนก่อน +1

      To me, personally, it sounds way overcomplicated for typical projects I work with. So I wouldn't want to show it on this channel, and it wouldn't even be possible to have a QUICK review without explaining all the pieces and WHY they exist.
      But if it works for you, then great!

  • @1234matthewjohnson
    @1234matthewjohnson 8 หลายเดือนก่อน

    amazing work sir

  • @alaneugenio785
    @alaneugenio785 8 หลายเดือนก่อน

    Povilas, in a situation where you'd have methods that differ from laravels controller conventional methods, for example, an export or even a multi-delete method, where would you suggest putting those in the project?
    I'm having trouble figuring out how to organize my project in a situation like this.

    • @LaravelDaily
      @LaravelDaily  8 หลายเดือนก่อน +1

      In the same controller, no big deal.

    • @alaneugenio785
      @alaneugenio785 8 หลายเดือนก่อน

      @@LaravelDaily but placing every method in the same controller like this wouldn't make it scale badly? Wouldn't be better to, for example, make an invokable controller for each of those out of convention methods?

  • @davidnorris8160
    @davidnorris8160 8 หลายเดือนก่อน

    Which documentation did u use on this demo please

    • @LaravelDaily
      @LaravelDaily  8 หลายเดือนก่อน

      Documentation?

  • @marekmiklusek3398
    @marekmiklusek3398 8 หลายเดือนก่อน

    Hello Mr. Povilas, this course must be great, but I learn better from a video course, have you thought about making it a video course, or making other courses in video format?

    • @LaravelDaily
      @LaravelDaily  8 หลายเดือนก่อน +1

      I did shoot courses in video format, at first, for many years, but in 2023 I switched to text because that way the courses can be always updated quickly, also I can release more courses. And, honestly, most students say these are easier to read because you can skim quickly and find only relevant information, and you can't do that with video.
      But I will keep shooting TH-cam videos on this channel, just not in the form of courses.

    • @marekmiklusek3398
      @marekmiklusek3398 8 หลายเดือนก่อน

      @@LaravelDaily Ok i understand, you are right, you do a really great job, your videos have taught me a lot and will definitely teach a lot more, thank you!🙏

  • @akhelijmohamed1063
    @akhelijmohamed1063 8 หลายเดือนก่อน +1

    You realy need a designer for your courses thumbnails🙂

    • @nilpo
      @nilpo 8 หลายเดือนก่อน +1

      Why? They tell you exactly what they are

    • @akhelijmohamed1063
      @akhelijmohamed1063 8 หลายเดือนก่อน

      @@nilpo I respect that, but also they need to be attractive, like laracast ones

    • @nilpo
      @nilpo 8 หลายเดือนก่อน

      @@akhelijmohamed1063 Respectfully, I disagree. More often than not, polished thumbnails lead to lackluster content. (Laracast would be an exception, of course.) I like that this channel focuses all of its attention on developing great content. No time is wasted polishing the things that don't really matter. I find that refreshing.

    • @akhelijmohamed1063
      @akhelijmohamed1063 8 หลายเดือนก่อน

      @@nilpo you are right, thats why they just have to not fall into the same trap. In Morocco we say "زين تبيع" which mean "Beautify to sell". What I am saying is that for them to allow more people to enjoy this kind of high quality courses, they need attractive thumbs. The clarity of the content should be also taken care of like they always do.

  • @fasterisq2.1m76
    @fasterisq2.1m76 8 หลายเดือนก่อน +2

    I think you complicating the codebase by creating many files unnecessarily. This way no suitable for all kind of project, the seperation of concern is wasting time by wasting time to seperate and jumping many files on vscode to do a task its time to think out of the box for old php developers.
    Just try nodejs express and change the way of thinking.
    Many old php developers are blindly following some rules or principles (like solid..) without any benefit and make it more complicating thins.
    Same state in laravel, making a problem (many bloatware file like config files seperated by seperation of concern principle) and introduced a new version (11) as the solution 😂

  • @matthausnawan2817
    @matthausnawan2817 8 หลายเดือนก่อน

    waiting for python-daily

    • @LaravelDaily
      @LaravelDaily  8 หลายเดือนก่อน

      It actually already started for a few months, channel "python ML Daily"