umairparacha
1 month ago
125
2
Laravel

How to check the request is null

Posted 1 month ago by umairparacha

Here is y controller

if (empty($request->except('_token'))) {
	return back()->withErrors('Nothing to update');
}

$user->update($data);
return redirect('/profile/edit')->withToastSuccess('Updated Successfully!');

Please sign in or create an account to participate in this conversation.