You've already forked Atomcms-edit
Initial commit
This commit is contained in:
Executable
+35
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|PasswordResetToken create($attributes = [])
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|PasswordResetToken select($columns = ['*'])
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|PasswordResetToken where($column, $operator = null, $value = null)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|PasswordResetToken first()
|
||||
*/
|
||||
class PasswordResetToken extends Model
|
||||
{
|
||||
#[\Override]
|
||||
protected $primaryKey = 'token';
|
||||
|
||||
#[\Override]
|
||||
protected $fillable = ['email', 'token', 'created_at'];
|
||||
|
||||
/** @var array<string, string> */
|
||||
#[\Override]
|
||||
protected $casts = [
|
||||
'created_at' => 'date',
|
||||
];
|
||||
|
||||
// timestamps = true, but we don't have "UPDATED_AT". To prevent an error, we set the default value to `null`.
|
||||
public const UPDATED_AT = null;
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'email', 'mail');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user