-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: crynobone <crynobone@gmail.com>
- Loading branch information
Showing
2 changed files
with
33 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php namespace Orchestra\Http\Traits; | ||
|
||
trait PassThrough | ||
{ | ||
/** | ||
* The application implementation. | ||
* | ||
* @var \Orchestra\Contracts\Foundation\Foundation | ||
*/ | ||
protected $foundation; | ||
|
||
/** | ||
* Determine if the request has a URI that should pass through CSRF verification. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* | ||
* @return bool | ||
*/ | ||
protected function shouldPassThrough($request) | ||
{ | ||
foreach ($this->except as $except) { | ||
if ($this->foundation->is($except)) { | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,29 +1,9 @@ | ||
<?php namespace Orchestra\Http\Traits; | ||
|
||
/** | ||
* @deprecated v3.2.x | ||
*/ | ||
trait PassThroughTrait | ||
{ | ||
/** | ||
* The application implementation. | ||
* | ||
* @var \Orchestra\Contracts\Foundation\Foundation | ||
*/ | ||
protected $foundation; | ||
|
||
/** | ||
* Determine if the request has a URI that should pass through CSRF verification. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* | ||
* @return bool | ||
*/ | ||
protected function shouldPassThrough($request) | ||
{ | ||
foreach ($this->except as $except) { | ||
if ($this->foundation->is($except)) { | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
use PassThrough; | ||
} |