First Commit
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property string $interest
|
||||
* @property-read \Illuminate\Support\Carbon|null $created_at
|
||||
* @property-read \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read User $user
|
||||
*/
|
||||
class UserInterest extends Model
|
||||
{
|
||||
/** @var array<int, string> */
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'interest',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user that owns the interest.
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user