Rename user_bids table to bids
This commit is contained in:
29
app/Models/Bid.php
Normal file
29
app/Models/Bid.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
/**
|
||||
* @package App\Models
|
||||
*/
|
||||
class Bid extends BaseModel
|
||||
{
|
||||
public $table = 'bids';
|
||||
|
||||
public $fillable = [
|
||||
'user_id',
|
||||
'flight_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Relationships
|
||||
*/
|
||||
public function flight()
|
||||
{
|
||||
return $this->belongsTo(Flight::class, 'flight_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user