Laravel: Simple Strategy Pattern

Поделиться
HTML-код
  • Опубликовано: 4 авг 2024
  • Hi guys!
    In this video I'll show you how to utilize a simple strategy pattern to remove some of the more complex "ifs" in your codebase.
  • НаукаНаука

Комментарии • 13

  • @oleksiiberestniev5432
    @oleksiiberestniev5432 Год назад +2

    looks good, look forward to watching a new video

  • @gazorbpazorbian
    @gazorbpazorbian Год назад +3

    great video! like always! Loving this design pattern serie

  • @verard0
    @verard0 Год назад +2

    pretty nice video!🤘

  • @gazorbpazorbian
    @gazorbpazorbian Год назад +2

    how could I intercept a request that depending on the domain or subdomain go to an specific route list like in a multi tenant website. any other recommendations about it?

    • @saaslaravel
      @saaslaravel  Год назад +2

      If I understand correctly - this should work: pastebin.com/PcAf3y6c
      If you just want the subdomain to be dynamic, you can just do Route::domain('{prefix}')

  • @lahcenfahmi5361
    @lahcenfahmi5361 Год назад +2

    great bro , keep going, what editor do you use

    • @saaslaravel
      @saaslaravel  Год назад

      Thanks! It's good old phpstorm. Theme is Catpuccin

  • @aleksandarrancic6470
    @aleksandarrancic6470 Год назад +1

    I have a question. Why did you create __construct() in the controller? Laravel can solve dependencies if you use the service as param in the controller method directly.

    • @saaslaravel
      @saaslaravel  Год назад

      I just prefer to have it in the constructor. Makes it easier to read for me!

  • @millennia
    @millennia 11 месяцев назад

    can you do a OOP tutorial in the real world, I mean the advanced stuff such as readonly variables...etc.. Thank you for your amazing videos.

    • @saaslaravel
      @saaslaravel  11 месяцев назад

      You may want to watch my series called "Great Laravel applications", it covers stuff like that!

  • @bakre_dev8728
    @bakre_dev8728 Год назад +1

    1A