/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // Find the record from database $booking = Booking::where('id', '=', $id)->select(['id', 'artist_name'])->first(); // Transform Artist Name $artist_name = ucwords(str_replace('-', ' ', $booking->artist_name)); // Delete Resource $booking->delete(); // Set session flash confirmation message session()->flash('message', 'Booking Artist "' . $artist_name . '" Deleted Successfully'); // Set message important session()->flash('message_important', true); // Redirect to Artist Page return redirect()->route('admin.booking.index'); }
/** * Show the control panel view * * @return Response */ public function show() { $booking_count = Booking::CountNewRequests()->count(); return view('admin/_dashboard/index', compact('booking_count')); }