Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type annotations to user model #1763

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
Expand All @@ -13,6 +14,15 @@
* @method bool IsAdmin()
* @method GetEmail()
* @method int|false GetIdFromName($name)
*
* @property int $id
* @property string $firstname
* @property string $lastname
* @property string $email
* @property string $password
* @property string $institution
*
* @mixin Builder<User>
*/
class User extends Authenticatable implements MustVerifyEmail
{
Expand All @@ -31,7 +41,11 @@ class User extends Authenticatable implements MustVerifyEmail
* @var array
*/
protected $fillable = [
'firstname', 'lastname', 'email', 'password', 'institution',
'firstname',
'lastname',
'email',
'password',
'institution',
];

/**
Expand Down