Closed Newdelay closed 5 years ago
i would recommend using single authentication system and use roles to determine user identity if you are lazy ( like me ) and dont want to use roles you can alter the table users and add new column and add it to the model then you can simple check by $user->newColumn === 'customer'
As @talal424 suggested, use a single system, which seems better, but if it that doesn't work for you, try to call the setters within a middleware perhaps? That way you can possibly detect which one to apply using session or something else.
Hi, I got a problem. how I make dynamic setmodel in AppserviceProvider for Runtime.
I have two authentication in my project, and two login dealers and customers. that's why I need dynamic model.
I tried this.
DEALERS LOGİN CONTROLLER
`try{
CUSTOMERS LOGİN CONTROLLER
`$credentials = [ "username" => $request->username, "password" => $request->password, ];
I created a session login_type, if login type == 1 then user customer. else dealers.
AppserviceProivider
`public function boot() {
`
But Session Always Null.