Rename user_bids table to bids

This commit is contained in:
Nabeel Shahzad
2018-02-27 13:25:32 -06:00
parent c89926399b
commit 97764866f2
10 changed files with 40 additions and 30 deletions

29
app/Models/Bid.php Normal file
View 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');
}
}