Writeoff/Http/Controllers/CurrencyController.php
2023-10-10 11:18:12 +07:00

106 lines
2.6 KiB
PHP

<?php
namespace Modules\Writeoff\Http\Controllers;
use App\Http\Controllers\Controller;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Modules\Writeoff\DataTables\CurrencyDataTable;
use Modules\Writeoff\Entities\Currency;
use Modules\Writeoff\Http\Requests\Currency\StoreCurrencyRequest;
use Modules\Writeoff\Http\Requests\Currency\UpdateCurrencyRequest;
class CurrencyController extends Controller
{
public $user;
public function __construct()
{
$this->middleware(function ($request, $next) {
$this->user = Auth::guard('web')->user();
return $next($request);
});
}
/**
* Display a listing of the Currencies.
*
* @param \Modules\Writeoff\DataTables\CurrencyDataTable $dataTable
*
* @return mixed
*/
public function index(CurrencyDataTable $dataTable, Request $request)
{
if (is_null($this->user) || !$this->user->can('master.read')) {
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
}
return $dataTable->render('writeoff::parameter.currencies.index');
}
/**
* Store a newly created Currency in storage.
*
* @param \Illuminate\Http\Request $request
*
* @return mixed
*/
public function store(Request $request)
{
}
/**
* Show the form for creating a new Currency.
*/
public function create()
{
}
/**
* Display the specified Currency.
*
* @param \Modules\Writeoff\Entities\Currency $currency
*/
public function show(Currency $currency)
{
}
/**
* Show the form for editing the specified Currency.
*
* @param $id
*/
public function edit($id)
{
}
/**
* Update the specified Currency in storage.
*
* @param \Illuminate\Http\Request $request
* @param \Modules\Writeoff\Entities\Currency $currency
*
* @return mixed
*/
public function update(Request $request, Currency $currency)
{
}
/**
* Remove the specified Currency from storage.
*
* @param \Modules\Writeoff\Entities\Currency $currency
*
* @return void
*/
public function destroy(Currency $currency)
{
}
}