Commit a739afc3 authored by Taylor Otwell's avatar Taylor Otwell

Use constant for CSRF token.

parent 0f5558d2
<?php namespace Laravel; use Closure; <?php namespace Laravel;
use Closure;
use Laravel\Session\Payload as Session;
class Request { class Request {
...@@ -121,12 +124,7 @@ class Request { ...@@ -121,12 +124,7 @@ class Request {
*/ */
public static function forged() public static function forged()
{ {
if (Config::$items['session']['driver'] == '') return Input::get(Session::token) !== IoC::core('session')->token();
{
throw new \LogicException("A session driver must be specified to use the CSRF filter.");
}
return Input::get('csrf_token') !== IoC::core('session')->token();
} }
/** /**
...@@ -151,4 +149,4 @@ class Request { ...@@ -151,4 +149,4 @@ class Request {
return static::$route; return static::$route;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment