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 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.
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', ];
Thanks for this series! I learned a lot
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
That's a great point - nice catch! Thanks for watching 😊
@@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.
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',
];
next ,upload image , and remove image in storage 💪