File: /var/www/javago-portal-updates/app/Http/Controllers/Cafe/OrderHistoryController.php
<?php
namespace App\Http\Controllers\Cafe;
use App\Http\Controllers\Controller;
use App\Models\Order;
use App\Services\CafeOrderHistoryService;
use Illuminate\Http\Request;
class OrderHistoryController extends Controller
{
private $cafeOrderHistoryService;
public function __construct()
{
$this->cafeOrderHistoryService = new CafeOrderHistoryService(Order::class);
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data = [];
$data['dataUrl'] = route('cafe.order-history.data');
$data['cafeDashboard'] = route('cafe.dashboard');
$data['viewMore'] = isset(request()->view_more) ? request()->view_more : 'false';
return view('cafe.order-history.index', $data);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
public function data(Request $request)
{
return $this->cafeOrderHistoryService->data($request);
}
public function changeOrderCompleted(Request $request)
{
return $this->cafeOrderHistoryService->changeOrderCompleted($request);
}
public function detailsData(Request $request)
{
return $this->cafeOrderHistoryService->detailsData($request);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
return $this->cafeOrderHistoryService->show($id);
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}