$response = response()->json(['error' => trans('errors.permissionJson')], 403);
} else {
$response = redirect('/');
- $this->showErrorNotification( trans('errors.permission'));
+ $this->showErrorNotification(trans('errors.permission'));
}
throw new HttpResponseException($response);
*/
protected function jsonError($messageText = "", $statusCode = 500)
{
- return response()->json(['message' => $messageText], $statusCode);
+ return response()->json(['message' => $messageText, 'status' => 'error'], $statusCode);
}
/**
{
session()->flash('error', $message);
}
+
+ /**
+ * Get the validation rules for image files.
+ */
+ protected function getImageValidationRules(): string
+ {
+ return 'image_extension|no_double_extension|mimes:jpeg,png,gif,bmp,webp,tiff';
+ }
}