-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lupacescu Eduard
authored
Dec 22, 2019
1 parent
3331837
commit 16740c3
Showing
7 changed files
with
19 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
use Illuminate\Database\Eloquent\Model; | ||
|
||
/** | ||
* @package Binaryk\LaravelRestify\Http\Requests; | ||
* @author Eduard Lupacescu <[email protected]> | ||
*/ | ||
trait InteractWithRepositories | ||
|
@@ -45,7 +44,7 @@ public function repository() | |
]), 404); | ||
} | ||
|
||
if ( ! $repository::authorizedToViewAny($this)) { | ||
if (! $repository::authorizedToViewAny($this)) { | ||
throw new UnauthorizedException(__('Unauthorized to view repository :name.', [ | ||
'name' => $repository, | ||
]), 403); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,4 @@ | |
class RestifyRequest extends FormRequest | ||
{ | ||
use InteractWithRepositories; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ | |
use Illuminate\Support\Str; | ||
|
||
/** | ||
* Could be used as a trait in a model class and in a repository class | ||
* | ||
* Could be used as a trait in a model class and in a repository class. | ||
* | ||
* @author Eduard Lupacescu <[email protected]> | ||
*/ | ||
trait AuthorizableModels | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters