/** * Show the form for editing the specified branch. * * @param int $id * @return Response */ public function edit($id) { $bank = Bank::find($id); return View::make('banks.edit', compact('bank')); }
}); Route::get('leaveReports/selectApplicationPeriod', 'ReportsController@appperiod'); Route::post('leaveReports/leaveapplications', 'ReportsController@leaveapplications'); Route::get('leaveReports/selectApprovedPeriod', 'ReportsController@approvedperiod'); Route::post('leaveReports/approvedleaves', 'ReportsController@approvedleaves'); Route::get('leaveReports/selectRejectedPeriod', 'ReportsController@rejectedperiod'); Route::post('leaveReports/rejectedleaves', 'ReportsController@rejectedleaves'); Route::get('leaveReports/selectLeave', 'ReportsController@balanceselect'); Route::post('leaveReports/leaveBalances', 'ReportsController@leavebalances'); Route::get('leaveReports/selectLeaveType', 'ReportsController@leaveselect'); Route::post('leaveReports/Employeesonleave', 'ReportsController@employeesleave'); Route::get('leaveReports/selectEmployee', 'ReportsController@employeeselect'); Route::post('leaveReports/IndividualEmployeeLeave', 'ReportsController@individualleave'); Route::get('api/dropdown', function () { $id = Input::get('option'); $bbranch = Bank::find($id)->bankbranch; return $bbranch->lists('bank_branch_name', 'id'); }); Route::get('empedit/{id}', function ($id) { $employee = Employee::find($id); $branches = Branch::all(); $departments = Department::all(); $jgroups = JGroup::all(); $etypes = EType::all(); $banks = Bank::all(); $bbranches = BBranch::all(); return View::make('employees.cssedit', compact('branches', 'departments', 'etypes', 'jgroups', 'banks', 'bbranches', 'employee')); }); Route::get('css/payslips', function () { $employeeid = DB::table('employee')->where('personal_file_number', '=', Confide::user()->username)->pluck('id'); $employee = Employee::findorfail($employeeid);
/** * Remove the specified resource from storage. * DELETE /banks/{id} * * @param int $id * @return Response */ public function destroy($companies, $id) { $bank = Bank::find($id); $bank->delete(); }
public function show($debtor_no) { //return $debtor_no; $debtor = DB::table('debtors')->where('no', '=', $debtor_no)->first(); $company = Company::find($debtor->company_id); $contact = Contact::find($company->contact_id); $billing_company = Company::find($debtor->billing_company_id); $billing_contact = Contact::find($billing_company->contact_id); $account = Account::find($debtor->account_id); $bank = Bank::find($account->bank_id); $group = DebtorsGroup::find($debtor->account_id); return View::make('debtors.show')->with('company', $company)->with('contact', $contact)->with('billing_company', $billing_company)->with('billing_contact', $billing_contact)->with('account', $account)->with('bank', $bank)->with('legal', $debtor->legal)->with('country', $company->country)->with('billing_country', $billing_company->country)->with('group', $group); }