106 lines
2.5 KiB
PHP
106 lines
2.5 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\BranchDataTable;
|
|
use Modules\Writeoff\Entities\Branch;
|
|
use Modules\Writeoff\Http\Requests\Branch\StoreCurrencyRequest;
|
|
use Modules\Writeoff\Http\Requests\Branch\UpdateCurrencyRequest;
|
|
|
|
class BranchController 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 Branchs.
|
|
*
|
|
* @param \Modules\Writeoff\DataTables\BranchDataTable $dataTable
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function index(BranchDataTable $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.branches.index');
|
|
}
|
|
|
|
/**
|
|
* Store a newly created Branch in storage.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function store(Request $request)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Show the form for creating a new Branch.
|
|
*/
|
|
public function create()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Display the specified Branch.
|
|
*
|
|
* @param \Modules\Writeoff\Entities\Branch $branch
|
|
*/
|
|
public function show(Branch $branch)
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Show the form for editing the specified Branch.
|
|
*
|
|
* @param $id
|
|
*/
|
|
public function edit($id)
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Update the specified Branch in storage.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @param \Modules\Writeoff\Entities\Branch $branch
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function update(Request $request, Branch $branch)
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* Remove the specified Branch from storage.
|
|
*
|
|
* @param \Modules\Writeoff\Entities\Branch $branch
|
|
*
|
|
* @return void
|
|
*/
|
|
public function destroy(Branch $branch)
|
|
{
|
|
|
|
}
|
|
}
|