Support the ongoing development of Laravel.io →
Authentication

Hi! Is it possible to use a different table for users that call my application's API than the ones that are using the GUI?

The first category of users are in fact other applications that make http requests to my application. For these requests, I want to use a filter like that:

Route::filter('auth.api',function(){ Config::set('session.driver', 'array'); return Auth::onceBasic('username'); });

But I want to manage these users separately from the GUI users. Therefore I want to store them in a separate tables. Is there any easy way to tell onceBasic() to authenticate using another table/model?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

agougousis agougousis Joined 20 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.