Building the Create & Edit Link Components - Laravel Link Shortener [PART 6]

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 6

  • @J-wd2cx
    @J-wd2cx 3 роки тому

    Thanks for this series! I learned a lot

  • @Samuel.Mwangi
    @Samuel.Mwangi 4 роки тому

    At 0:50 I would have cast the field to boolean within the model but I like the simplicity in your choice of implementation. Kudos for an amazing series

    • @DavidGrzyb
      @DavidGrzyb  4 роки тому

      That's a great point - nice catch! Thanks for watching 😊

    • @Samuel.Mwangi
      @Samuel.Mwangi 4 роки тому +1

      @@DavidGrzyb Also regarding the slug being unique, I have had success using 'slug' => 'required|alpha_dash|min:3|max:100|unique:links,slug,'.$this->link_id, though I used rules() method instead of protected property, Will raise a PR for your review. Once again kudos for putting together an amazing series.

  • @emadabulebda5573
    @emadabulebda5573 4 роки тому

    first thanks!
    second, you can use casts array on the Link model to specify that the is_enabled column is a boolean data type, which worked for me
    protected $casts = [
    'is_enabled' => 'boolean',
    ];

  • @namakuaku9775
    @namakuaku9775 4 роки тому

    next ,upload image , and remove image in storage 💪