No video

30 Days to Learn Laravel, Ep 17 - Always Validate. Never Trust the User.

  Рет қаралды 4,094

Laracasts

Laracasts

Күн бұрын

Пікірлер: 12
@2gbeh
@2gbeh 3 ай бұрын
PLEASE do a combined length video after episode 30 🙏
@anandgupta185
@anandgupta185 3 ай бұрын
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
@2gbeh 3 ай бұрын
Absolutely
@renatofrota
@renatofrota 21 күн бұрын
for clarity to newbies, add after "required" attribute: value="{{ old('title') }}" and value="{{ old('salary') }}" respectively
@LoneTaha
@LoneTaha Ай бұрын
perfect.
@shadeblack
@shadeblack 2 ай бұрын
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
@mohamedaminedammak2319 3 ай бұрын
4:07 where did we specify that the title can't be null in the db end or is it just by default?
@abdulmanan5030
@abdulmanan5030 2 ай бұрын
if we didnt specify null its automaticlly take as can't be null
@mohamedaminedammak2319
@mohamedaminedammak2319 2 ай бұрын
Thank you 🤝
@user-rj1eu6kp3u
@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 :)
@mohamedaminedammak2319
@mohamedaminedammak2319 Ай бұрын
@@user-rj1eu6kp3u thank you i appreciate it
@samuelakinnuoye9938
@samuelakinnuoye9938 14 күн бұрын
lol 13:44
Let's Have a Dialog about Dialogs!
35:18
Laracasts
Рет қаралды 6 М.
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 70 МЛН
Challenge matching picture with Alfredo Larin family! 😁
00:21
BigSchool
Рет қаралды 41 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 33 МЛН
How This New Battery is Changing the Game
12:07
Undecided with Matt Ferrell
Рет қаралды 196 М.
HTMX and PHP Data Management: From CRUD to Real-time Updates
13:53
ColdFusion, PHP, JavaScript - Code Craft Hub
Рет қаралды 1,2 М.
Everything You Need to Know About Laravel in 30 Minutes
29:15
How JavaScript Ruined the Web
15:02
Eric Murphy
Рет қаралды 116 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 569 М.
LARACON EU 2024 // TAYLOR OTWELL :: LARAVEL UPDATE
1:10:48
Laracon EU
Рет қаралды 54 М.
30 Days to Learn Laravel, Ep 29 - Jobs, Tags, TDD, Oh My!
34:46
React Hook Form - Complete Tutorial (with Zod)
28:22
Cosden Solutions
Рет қаралды 104 М.
Laravel + Livewire todo app (and so much more)
16:41
Aaron Francis
Рет қаралды 39 М.
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 70 МЛН