refactor: update models relations
This commit is contained in:
@@ -22,6 +22,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property Collection|Flight[] $flights
|
||||
* @property Collection|User[] $users
|
||||
*
|
||||
* @package App\Models
|
||||
@@ -43,6 +44,11 @@ class File extends Model
|
||||
'path'
|
||||
];
|
||||
|
||||
public function flights()
|
||||
{
|
||||
return $this->hasMany(Flight::class);
|
||||
}
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->hasMany(User::class);
|
||||
|
||||
Reference in New Issue
Block a user