/ Published in: PHP

Laravel provides several different ways to validate your application incoming data.By default Laravel’s base controller class uses a ValidatesRequests trait which provides a convenient method to validate all incoming HTTP requests coming from client.You can also validate data in laravel by creating Form Request.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$validatedData = $request->validate([ 'name' => 'required|max:255', 'username' => 'required|alpha_num', 'age' => 'required|numeric', ]);
URL: https://www.onlineinterviewquestions.com/laravel-interview-questions/
Comments
