Skip to content

Commit

Permalink
Code flow re-engineering
Browse files Browse the repository at this point in the history
  • Loading branch information
general-oisebe committed Oct 25, 2020
1 parent 208dda5 commit f3cb368
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class HomeController extends Controller

| Version | Status | Packagist | Namespace | Repo |
|---------|------------|---------------------|--------------|---------------------|
| 1.x | Latest | `dev-techguy/laravel-multiple-guards` | `LaravelMultipleGuards` | [v1.1.5](https://github.com/dev-techguy/laravel-multiple-guards/releases/tag/v1.1.5)|
| 1.x | Latest | `dev-techguy/laravel-multiple-guards` | `LaravelMultipleGuards` | [v1.1.6](https://github.com/dev-techguy/laravel-multiple-guards/releases/tag/v1.1.6)|

[laravel-multiple-guards-repo]: https://github.com/dev-techguy/laravel-multiple-guards.git

Expand Down
12 changes: 0 additions & 12 deletions src/Traits/FindGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ trait FindGuard
*/
public function findGuardType(bool $returnGuardNameString = false)
{
// before start of slicing check if one is authorized
if (!Auth::check())
return redirect()->intended();

// validate if its an array
if (count($this->sliceArray())) {
// check the guard authenticated by looping
Expand Down Expand Up @@ -72,10 +68,6 @@ public function findGuardType(bool $returnGuardNameString = false)
*/
public function setGuardMiddleware()
{
// before start of slicing check if one is authorized
if (!Auth::check())
return redirect()->intended();

// validate if its an array
if (count($this->sliceArray())) {
// check the guard authenticated by looping
Expand Down Expand Up @@ -110,10 +102,6 @@ public function setGuardMiddleware()
*/
private function sliceArray()
{
// before start of slicing check if one is authorized
if (!Auth::check())
return redirect()->intended();

// define empty array
$sliced = [];

Expand Down

0 comments on commit f3cb368

Please sign in to comment.