⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.63
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
biz.gsm.com.ng
/
app
/
Http
/
Controllers
/
View File Name :
ChartOfAccountTypeController.php
can('manage constant chart of account type')) { $types = ChartOfAccountType::where('created_by', '=', \Auth::user()->creatorId())->get(); return view('chartOfAccountType.index', compact('types')); } else { return redirect()->back()->with('error', __('Permission denied.')); } } public function create() { return view('chartOfAccountType.create'); } public function store(Request $request) { if(\Auth::user()->can('create constant chart of account type')) { $validator = \Validator::make( $request->all(), [ 'name' => 'required', ] ); if($validator->fails()) { $messages = $validator->getMessageBag(); return redirect()->back()->with('error', $messages->first()); } $account = new ChartOfAccountType(); $account->name = $request->name; $account->created_by = \Auth::user()->creatorId(); $account->save(); return redirect()->route('chart-of-account-type.index')->with('success', __('Chart of account type successfully created.')); } else { return redirect()->back()->with('error', __('Permission denied.')); } } public function show(ChartOfAccountType $chartOfAccountType) { // } public function edit(ChartOfAccountType $chartOfAccountType) { return view('chartOfAccountType.edit', compact('chartOfAccountType')); } public function update(Request $request, ChartOfAccountType $chartOfAccountType) { if(\Auth::user()->can('edit constant chart of account type')) { $validator = \Validator::make( $request->all(), [ 'name' => 'required', ] ); if($validator->fails()) { $messages = $validator->getMessageBag(); return redirect()->back()->with('error', $messages->first()); } $chartOfAccountType->name = $request->name; $chartOfAccountType->save(); return redirect()->route('chart-of-account-type.index')->with('success', __('Chart of account type successfully updated.')); } else { return redirect()->back()->with('error', __('Permission denied.')); } } public function destroy(ChartOfAccountType $chartOfAccountType) { if(\Auth::user()->can('delete constant chart of account type')) { $chartOfAccountType->delete(); return redirect()->route('chart-of-account-type.index')->with('success', __('Chart of account type successfully deleted.')); } else { return redirect()->back()->with('error', __('Permission denied.')); } } }