File: /var/www/javago-portal-updates/app/Http/Controllers/Admin/CafeListingRequestController.php
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\CafeRequest;
use App\Services\CafeListingRequestService;
use Illuminate\Http\Request;
class CafeListingRequestController extends Controller
{
private $cafeListingRequestService;
public function __construct()
{
$this->cafeListingRequestService = new CafeListingRequestService(CafeRequest::class);
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data = [];
$data['dataUrl'] = route('admin.cafe-listing-request.data');
return view('admin.cafe-listing-request.index', $data);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* 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->cafeListingRequestService->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)
{
$modelName = 'Cafe Request';
return $this->cafeListingRequestService->destroy($id, $modelName);
}
public function approve($id)
{
return $this->cafeListingRequestService->approve($id);
}
// public function status(ChangeStatusRequest $request, $id)
// {
// $userType = 'Cafe';
// return $this->cafeManagementService->status($request, $id, $userType);
// }
public function data()
{
return $this->cafeListingRequestService->data();
}
}