Metoda kontroli laravel to post
$method = $request->method();
if ($request->isMethod('post')) {
//
}
Undefined
$method = $request->method();
if ($request->isMethod('post')) {
//
}
if ($request->isMethod('post')) {
return ['user' => $user];
}