laravel post form code example
Example 1: check method in laravel
if ($request->isMethod('post')) {
return ['user' => $user];
}
Example 2: check method in laravel
if ($request->isMethod('post')) {
// statement
}
if ($request->isMethod('post')) {
return ['user' => $user];
}
if ($request->isMethod('post')) {
// statement
}