PLEASE do a combined length video after episode 30 🙏
@anandgupta1853 ай бұрын
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.
@2gbeh3 ай бұрын
Absolutely
@renatofrota21 күн бұрын
for clarity to newbies, add after "required" attribute: value="{{ old('title') }}" and value="{{ old('salary') }}" respectively
@LoneTahaАй бұрын
perfect.
@shadeblack2 ай бұрын
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
@mohamedaminedammak23193 ай бұрын
4:07 where did we specify that the title can't be null in the db end or is it just by default?
@abdulmanan50302 ай бұрын
if we didnt specify null its automaticlly take as can't be null
@mohamedaminedammak23192 ай бұрын
Thank you 🤝
@user-rj1eu6kp3uАй бұрын
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 :)