Closed sornss closed 4 years ago
Proxies should only be used within your library and not within the application1, that includes the app config as well.
1: See Concord Proxies.
Use the model class instead of the proxy on line 72 in auth.php:
'providers' => [
'users' => [
'driver' => 'eloquent',
//'model' => App\User::class,
'model' => \Avendor\Demo\Models\User::class,
],
Another approach is to keep the original App\User
in auth.php but modify the class to extend your user model:
// app/User.php
namespace App;
class User extends Avendor\Demo\Models\User {}
We, at artkonekt typically use the second solution when building on top of AppShell's extended user model.
Thank you again, Attila, for the possible solutions.
Hello,
New guy here, I have tried to setup an external module(Avendor/Demo) with Laravel 6. and Concord 1.4. with the below error when specify providers' model to UserProxy::modelClass() in the config file auth.php.
`$ composer dump-autoload Generating optimized autoload files
The simple repo is at https://github.com/sornss/laravel_concord_demo.
Can you please let me know the reason or any help?
Thanks in advance.