Created
January 14, 2019 19:28
-
-
Save tabuna/f13450aad15a023d49213662eec6167b to your computer and use it in GitHub Desktop.
User.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Contracts\Auth\MustVerifyEmail; | |
use Illuminate\Notifications\Notifiable; | |
use Orchid\Platform\Models\User as Authenticatable; | |
use Orchid\Screen\Fields\InputField; | |
class User extends Authenticatable implements MustVerifyEmail | |
{ | |
use Notifiable; | |
/** | |
* The attributes that are mass assignable. | |
* | |
* @var array | |
*/ | |
protected $fillable = [ | |
'name', 'email', 'password', | |
]; | |
/** | |
* The attributes that should be hidden for arrays. | |
* | |
* @var array | |
*/ | |
protected $hidden = [ | |
'password', 'remember_token', | |
]; | |
/** | |
* @return \Illuminate\Support\Collection | |
*/ | |
public static function modelFields() | |
{ | |
return collect([ | |
'name' => InputField::make('user.name') | |
->type('text') | |
->required() | |
->title(__('Name')) | |
->placeholder(__('Name')), | |
'email' => InputField::make('user.email') | |
->type('email') | |
->required() | |
->title(__('Email')) | |
->placeholder(__('Email')), | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment