Commit 71a5f393 authored by Micheal Mand's avatar Micheal Mand Committed by Nicolas Widart

Allow the User presenter to be configurable (#249)

parent 6ee967f6
...@@ -29,6 +29,12 @@ return [ ...@@ -29,6 +29,12 @@ return [
| only supported by the Sentinel user driver | only supported by the Sentinel user driver
*/ */
'login-columns' => ['email'], 'login-columns' => ['email'],
/*
|--------------------------------------------------------------------------
| Define a class that will handle User presentation
|--------------------------------------------------------------------------
*/
'presenter' => \Modules\User\Presenters\UserPresenter::class,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Allow anonymous user registration | Allow anonymous user registration
......
...@@ -32,6 +32,7 @@ class User extends EloquentUser implements UserInterface ...@@ -32,6 +32,7 @@ class User extends EloquentUser implements UserInterface
{ {
$this->loginNames = config('asgard.user.config.login-columns'); $this->loginNames = config('asgard.user.config.login-columns');
$this->fillable = config('asgard.user.config.fillable'); $this->fillable = config('asgard.user.config.fillable');
$this->presenter = config('asgard.user.config.presenter');
parent::__construct($attributes); parent::__construct($attributes);
} }
......
...@@ -29,6 +29,12 @@ return [ ...@@ -29,6 +29,12 @@ return [
| only supported by the Sentinel user driver | only supported by the Sentinel user driver
*/ */
'login-columns' => ['email'], 'login-columns' => ['email'],
/*
|--------------------------------------------------------------------------
| Define a class that will handle User presentation
|--------------------------------------------------------------------------
*/
'presenter' => \Modules\User\Presenters\UserPresenter::class,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Allow anonymous user registration | Allow anonymous user registration
......
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