ollieread/multiauth

Add default provider

Anahkiasen opened this issue · 0 comments

Currently switching to Multiauth is very complicated because every call to Auth becomes invalid. It would be nice to be able to specify which of the authentications is the default one so that calls to Auth:: delegate to it via __call.
Example:

    'default' => 'app',
    'multi' => array(
        'app' => array(
            'driver' => 'eloquent',
            'model' => 'Account'
        ),
        'admin' => array(
            'driver' => 'database',
            'table' => 'users'
        )
    ),
Auth::admin()->check(); // Works as expected
Auth::check(); // Delegates to Auth::app()->check()