Commit 012663dd authored by Taylor Otwell's avatar Taylor Otwell

fix conflicts.

parents 69d9257a 4389e5fa
...@@ -139,46 +139,47 @@ return array( ...@@ -139,46 +139,47 @@ return array(
*/ */
'aliases' => array( 'aliases' => array(
'Auth' => 'Laravel\\Auth', 'Auth' => 'Laravel\\Auth',
'Asset' => 'Laravel\\Asset', 'Authenticator' => 'Laravel\\Auth\\Drivers\\Driver',
'Autoloader' => 'Laravel\\Autoloader', 'Asset' => 'Laravel\\Asset',
'Blade' => 'Laravel\\Blade', 'Autoloader' => 'Laravel\\Autoloader',
'Bundle' => 'Laravel\\Bundle', 'Blade' => 'Laravel\\Blade',
'Cache' => 'Laravel\\Cache', 'Bundle' => 'Laravel\\Bundle',
'Config' => 'Laravel\\Config', 'Cache' => 'Laravel\\Cache',
'Controller' => 'Laravel\\Routing\\Controller', 'Config' => 'Laravel\\Config',
'Cookie' => 'Laravel\\Cookie', 'Controller' => 'Laravel\\Routing\\Controller',
'Crypter' => 'Laravel\\Crypter', 'Cookie' => 'Laravel\\Cookie',
'DB' => 'Laravel\\Database', 'Crypter' => 'Laravel\\Crypter',
'Eloquent' => 'Laravel\\Database\\Eloquent\\Model', 'DB' => 'Laravel\\Database',
'Event' => 'Laravel\\Event', 'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
'File' => 'Laravel\\File', 'Event' => 'Laravel\\Event',
'Filter' => 'Laravel\\Routing\\Filter', 'File' => 'Laravel\\File',
'Form' => 'Laravel\\Form', 'Filter' => 'Laravel\\Routing\\Filter',
'Hash' => 'Laravel\\Hash', 'Form' => 'Laravel\\Form',
'HTML' => 'Laravel\\HTML', 'Hash' => 'Laravel\\Hash',
'Input' => 'Laravel\\Input', 'HTML' => 'Laravel\\HTML',
'IoC' => 'Laravel\\IoC', 'Input' => 'Laravel\\Input',
'Lang' => 'Laravel\\Lang', 'IoC' => 'Laravel\\IoC',
'Log' => 'Laravel\\Log', 'Lang' => 'Laravel\\Lang',
'Memcached' => 'Laravel\\Memcached', 'Log' => 'Laravel\\Log',
'Paginator' => 'Laravel\\Paginator', 'Memcached' => 'Laravel\\Memcached',
'Profiler' => 'Laravel\\Profiling\\Profiler', 'Paginator' => 'Laravel\\Paginator',
'URL' => 'Laravel\\URL', 'Profiler' => 'Laravel\\Profiling\\Profiler',
'Redirect' => 'Laravel\\Redirect', 'URL' => 'Laravel\\URL',
'Redis' => 'Laravel\\Redis', 'Redirect' => 'Laravel\\Redirect',
'Request' => 'Laravel\\Request', 'Redis' => 'Laravel\\Redis',
'Response' => 'Laravel\\Response', 'Request' => 'Laravel\\Request',
'Route' => 'Laravel\\Routing\\Route', 'Response' => 'Laravel\\Response',
'Router' => 'Laravel\\Routing\\Router', 'Route' => 'Laravel\\Routing\\Route',
'Schema' => 'Laravel\\Database\\Schema', 'Router' => 'Laravel\\Routing\\Router',
'Section' => 'Laravel\\Section', 'Schema' => 'Laravel\\Database\\Schema',
'Session' => 'Laravel\\Session', 'Section' => 'Laravel\\Section',
'Str' => 'Laravel\\Str', 'Session' => 'Laravel\\Session',
'Task' => 'Laravel\\CLI\\Tasks\\Task', 'Str' => 'Laravel\\Str',
'URI' => 'Laravel\\URI', 'Task' => 'Laravel\\CLI\\Tasks\\Task',
'Validator' => 'Laravel\\Validator', 'URI' => 'Laravel\\URI',
'View' => 'Laravel\\View', 'Validator' => 'Laravel\\Validator',
'View' => 'Laravel\\View',
), ),
); );
...@@ -5,6 +5,7 @@ use Laravel\Cookie; ...@@ -5,6 +5,7 @@ use Laravel\Cookie;
use Laravel\Config; use Laravel\Config;
use Laravel\Session; use Laravel\Session;
use Laravel\Crypter; use Laravel\Crypter;
use Laravel\Database\Eloquent\Model as Eloquent;
abstract class Driver { abstract class Driver {
......
...@@ -15,7 +15,30 @@ class Eloquent extends Driver { ...@@ -15,7 +15,30 @@ class Eloquent extends Driver {
if (filter_var($id, FILTER_VALIDATE_INT) !== false) if (filter_var($id, FILTER_VALIDATE_INT) !== false)
{ {
return $this->model()->find($id); return $this->model()->find($id);
} }
}
/**
* Login the user assigned to the given token.
*
* The token is typically a numeric ID for the user.
*
* @param mixed $token
* @param bool $remember
* @return bool
*/
public function login($token, $remember = false)
{
// if the token is an Eloquent model get the primary key
if ($token instanceof \Eloquent) $token = $token->get_key();
$this->token = $token;
$this->store($token);
if ($remember) $this->remember($token);
return true;
} }
/** /**
......
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