How to Define Default Attributes in Your Laravel Model #laravel #shorts

How to Define Default Attributes in Your Laravel Model #laravel #shorts

Code With Dary

1 год назад

2,971 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Omar ALGalfy
Omar ALGalfy - 15.04.2023 13:40

So if i forgot to set default value for column i make it here without migration

Ответить
NayNay ZA
NayNay ZA - 15.04.2023 00:39

This is an interesting take on attributes. Thank you! By the way what vscode theme are you using?

I also agree with Francesco, default in migration is my more go to, but I will definitely try this

Ответить
Morteza
Morteza - 13.04.2023 03:07

Cool, I wasn't aware of this feature

Ответить
Francesco Leto
Francesco Leto - 10.04.2023 14:40

I prefer declare default in migration but it's a valid option

Ответить