How to Extend Laravel Package: Spatie Tags Model Example

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • A practical example of adding extra behavior to a Laravel package.
    My course "SOLID Code in Laravel": laraveldaily.t...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses membership: laraveldaily.t...
    - Laravel QuickAdminPanel: bit.ly/quickad...
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: bit.ly/laravel-...
    - My personal Twitter: / povilaskorop

КОМЕНТАРІ • 25

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

    Great video as always Povilas, thanks.
    Just wanted to say that your SOLID course is one of my favourites. That and the one on database structures.

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

    Just in Time :)
    I Was Just Thinking of this two days ago ♥ Thanks

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

    Thanks. That was very helpful.

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

    Amazing!

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

    how about handling or tagging user id ? so that they can see if they are involve into a particular post, because I'm struggling this kind of an idea. give me a HINT Sir, thank you.

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

    Great video! Does this have any consequences if you do a composer update afterwards?

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

      It depends on the package and its changes

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

    Sample scenario:
    I have a base class (let's call it SomeModel), which extends Eloquent's Model, and adds extra functionality that I wish to have on all of my models.
    If I wanted to use Spatie's Tag on top of that, how best can I go about doing this?
    I cannot extend from both classes.
    I ran into this issue and resolved it somewhat by using traits instead, but wasn't too happy with it and would like to know if there is a better way.

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

      Traits sound like a good solution here, from what I've read

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

    1:58 Что означает ->constrained()? в строке 17 $table->foreinId('tag_type_id')->nullable()->constrained();

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

    Hi is there a way to send push notifications to 2000+ users with in 2 milli seconds using laravel and react native. Please help me with this or any system design for this module. Thanks

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

      I don't think so, there's some info how others do it, ua-cam.com/video/vvhC64hQZMk/v-deo.html&ab_channel=GauravSen
      this one is also clear ua-cam.com/video/bBTPZ9NdSk8/v-deo.html

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

    Сделайте видео о пагинации пожалуйста. У меня почему-то гет параметры не приходят в реквест. Никак понять не могу что делать )

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

    I don't feel confident enough to do this

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

      How/when are you planning to become confident, then? :)

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

      Just try to do it first. It's simple enough when you get it

  • @1994Altamash
    @1994Altamash 2 роки тому

    {"success":false,"message":"Bad Request","statusCode":400}
    when i tried to login in a login form in local env i am getting this message and also some pages load but not working properly but when my friends everything work fine as normal "having this issue only on local ENV live everythings work fine" can anyone help me PLEASE, @LaravelDaily please help

    • @krekas
      @krekas 2 роки тому +2

      No one can debug your internal problems. Especially without code. From error I would say it's local configuration problems

    • @1994Altamash
      @1994Altamash 2 роки тому

      @@krekas thanks for the reply, is there is any video that show how to localy setup your laravel project

    • @aeiou...
      @aeiou... 2 роки тому

      @@1994Altamash if the status code is 4xx, then the problem is within the data being pass to the server. Check the validations for that request

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

      Посмотри в отладчике браузера что ты отсылаешь на сервер. У тебя неправильные данные уходят в запросе. Посмотри их и будет понятно. Может путь неправильный или что-то с самими данными, может метод отправки формы не тот, что надо.

    • @1994Altamash
      @1994Altamash 2 роки тому

      @@ringnull the issue is that its only happning in local same credential work on dev env without any issue