17 nov 2018
This commit is contained in:
parent
0c9a118281
commit
765d6a2f6b
52 changed files with 3200 additions and 229 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Booking;
|
||||
use App\Services\HTMLHelper;
|
||||
use DataTables;
|
||||
use App\User;
|
||||
|
|
@ -68,6 +69,26 @@ class DataTableController extends Controller
|
|||
->make(true);
|
||||
}
|
||||
|
||||
public function getBookings()
|
||||
{
|
||||
//confirmation_code_remider is delete 2
|
||||
$query = Booking::orderBy("id", "DESC");
|
||||
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (Booking $booking) {
|
||||
return '<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('id', function (Booking $booking) {
|
||||
return '<a href="' . route('booking_detail', [$booking->id]) . '" data-id="'.$booking->id.'">'.$booking->id.'</a>';
|
||||
})
|
||||
->rawColumns(['action_edit', 'id'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue