mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
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:
@@ -427,6 +427,13 @@ class BookingController extends Controller
|
||||
return response()->json(['message'=>'Success'],200);
|
||||
}
|
||||
|
||||
public function showPurchaseOrder($id){
|
||||
$booking = Booking::where('id',$id)->first();
|
||||
$user_po = $booking->purchaseOrder()->first();
|
||||
|
||||
return response()->json(['po_path'=> $user_po],200);
|
||||
}
|
||||
|
||||
public function delete(Booking $book_id)
|
||||
{
|
||||
$booking = Booking::where('user_id', Auth::user())->where('id', $book_id)->firstOrFail();
|
||||
|
||||
Reference in New Issue
Block a user