Great explanation ❤ By the way, a useful tool in this scenario is the old() helper function, which retrieves the previously entered value by the user.
@2gbeh
5 ай бұрын
Absolutely
@renatofrota
2 ай бұрын
for clarity to newbies, add after "required" attribute: value="{{ old('title') }}" and value="{{ old('salary') }}" respectively
@2gbeh
5 ай бұрын
PLEASE do a combined length video after episode 30 🙏
@sale7680
Ай бұрын
Thanks
@sale7680
Ай бұрын
❤❤❤❤
@shadeblack
3 ай бұрын
Running some javascript on error to provide a toast or do some background logic/restyling is pretty cool too: @error('title') $(document).ready(() => { alert('Validation Error: {{ $message }}'); // or toast function $('[name="title"]').addClass('bg-red-100'); }); {{ $message }} @enderror
@mohamedaminedammak2319
4 ай бұрын
4:07 where did we specify that the title can't be null in the db end or is it just by default?
@abdulmanan5030
4 ай бұрын
if we didnt specify null its automaticlly take as can't be null
@mohamedaminedammak2319
4 ай бұрын
Thank you 🤝
@Omar-p9r3c
3 ай бұрын
when you create a migration and within that migration you create a table, you can specify what columns to create and their conditions. by default they don't accept null as value but if you add to the column creation "->nullable()" it will enable it. You can do that in a new migration if you already have that table by the way. Just create a new one and inside the up() method, use : Schema::table(name_of_table, function(Blueprint $table) { $table->text('title')->nullable()->change(); }); and don't forget to do the opposite inside the down() method. --- then just run the migration and it's all up :)
Пікірлер: 14