rename book_id in po table to booking_id to perform ORM relantionship

added relationship between booking and po
updated settings shows for different role
added function to display po for admin
This commit is contained in:
Jack Goh
2018-06-28 10:06:26 +08:00
parent 9432cdaaad
commit 2b4ddadfcb
7 changed files with 110 additions and 46 deletions
+5
View File
@@ -7,4 +7,9 @@ use Illuminate\Database\Eloquent\Model;
class PurchaseOrder extends Model
{
protected $fillable = ['image_url','amount','booking_id'];
public function booking()
{
return $this->belongsTo(Booking::class);
}
}