Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Exceptions/RestifyHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public function render($request, Exception $exception)
$response->error();
}


return $response->toResponse($request);
}

Expand Down
10 changes: 5 additions & 5 deletions src/Traits/AuthorizableModels.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function authorizable()
*/
public function authorizeToShowAny(Request $request)
{
if ( ! static::authorizable()) {
if (! static::authorizable()) {
return;
}

Expand All @@ -60,7 +60,7 @@ public function authorizeToShowAny(Request $request)
*/
public static function authorizedToShowAny(Request $request)
{
if ( ! static::authorizable()) {
if (! static::authorizable()) {
return true;
}

Expand All @@ -81,7 +81,7 @@ public function authorizeToShow(Request $request)
}

/**
* Determine if the current user can view the given resource
* Determine if the current user can view the given resource.
*
* @param Request $request
* @return bool
Expand All @@ -101,7 +101,7 @@ public function authorizedToShow(Request $request)
*/
public static function authorizeToCreate(Request $request)
{
if ( ! static::authorizedToCreate($request)) {
if (! static::authorizedToCreate($request)) {
throw new AuthorizationException('Unauthorized to create.');
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ public function authorizedTo(Request $request, $ability)

/**
* Since this trait could be used by a repository or by a model, we have to
* detect the model from either class
* detect the model from either class.
*
* @return AuthorizableModels|Model|mixed|null
* @throws ModelNotFoundException
Expand Down