File: /var/www/javago-portal-updates/app/Http/Controllers/Admin/UniversalLoyaltyStampController.php
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests\AddUniversalLoyaltyRequest;
use App\Http\Requests\EditUniversalLoyaltyRequest;
use App\Models\CafeManageLoyaltyStamp;
use App\Services\UniversalLoyaltyStampService;
class UniversalLoyaltyStampController extends Controller
{
private $universalLoyaltyStampService;
public function __construct()
{
$this->universalLoyaltyStampService = new UniversalLoyaltyStampService(CafeManageLoyaltyStamp::class);
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data = [];
$data['url'] = route('admin.universal-loyalty-stamp.create');
$data['dataUrl'] = route('admin.universal-loyalty-stamp.data');
return view('admin.universal-loyalty-stamp.index', $data);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return $this->universalLoyaltyStampService->create();
}
public function data()
{
return $this->universalLoyaltyStampService->data();
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(AddUniversalLoyaltyRequest $request)
{
return $this->universalLoyaltyStampService->store($request);
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
return $this->universalLoyaltyStampService->edit($id);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(EditUniversalLoyaltyRequest $request, $id)
{
return $this->universalLoyaltyStampService->update($request, $id);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}