本文整理汇总了PHP中Audit::logaudit方法的典型用法代码示例。如果您正苦于以下问题:PHP Audit::logaudit方法的具体用法?PHP Audit::logaudit怎么用?PHP Audit::logaudit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Audit
的用法示例。
在下文中一共展示了Audit::logaudit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: store
/**
* Store a newly created kin in storage.
*
* @return Response
*/
public function store()
{
$validator = Validator::make($data = Input::all(), Nextofkin::$rules, Nextofkin::$messages);
if ($validator->fails()) {
return Redirect::back()->withErrors($validator)->withInput();
}
$kin = new Nextofkin();
$kin->employee_id = Input::get('employee_id');
$kin->name = Input::get('name');
$kin->relationship = Input::get('rship');
$kin->goodwill = Input::get('goodwill');
$kin->id_number = Input::get('id_number');
$kin->save();
Audit::logaudit('NextofKins', 'create', 'created: ' . $kin->name);
return Redirect::route('NextOfKins.index')->withFlashMessage('Employee`s next of kin successfully created!');
}
示例2: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$document = Document::findOrFail($id);
Document::destroy($id);
Audit::logaudit('Documents', 'delete', 'deleted: ' . $document->document_name);
return Redirect::route('documents.index')->withDeleteMessage('Employee Document successfully deleted!');
}
示例3: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$allowance = EAllowances::findOrFail($id);
EAllowances::destroy($id);
Audit::logaudit('Employee Allowances', 'delete', 'deleted: ' . $allowance->allowance_amount);
return Redirect::route('employee_allowances.index');
}
示例4: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$employee = Employee::findOrFail($id);
Employee::destroy($id);
Audit::logaudit('Employee', 'delete', 'deleted: ' . $employee->personal_file_number . '-' . $employee->first_name . ' ' . $employee->last_name);
return Redirect::route('employees.index');
}
示例5: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$deduction = Deduction::findOrFail($id);
Deduction::destroy($id);
Audit::logaudit('Deductions', 'delete', 'deleted: ' . $deduction->deduction_name);
return Redirect::route('deductions.index');
}
示例6: destroy
/**
* Remove the specified kin from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$property = Property::findOrFail($id);
Property::destroy($id);
Audit::logaudit('Properties', 'delete', 'deleted: ' . $property->name);
return Redirect::route('Properties.index')->withDeleteMessage('Company Property successfully deleted!');
}
示例7: destroy
/**
* Remove the specified account from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$account = Account::findOrFail($id);
Account::destroy($id);
Audit::logaudit('Accounts', 'delete', 'deleted:' . $account->name . ' ' . $account->code);
return Redirect::route('accounts.index');
}
示例8: store
/**
* Store a newly created branch in storage.
*
* @return Response
*/
public function store()
{
$employees = Employee::all();
foreach ($employees as $employee) {
$payroll = new Payroll();
$payroll->employee_id = $employee->personal_file_number;
$payroll->basic_pay = $employee->basic_pay;
$payroll->earning_amount = Payroll::total_benefits($employee->id);
$payroll->taxable_income = Payroll::gross($employee->id);
$payroll->paye = Payroll::tax($employee->id);
$payroll->nssf_amount = Payroll::nssf($employee->id);
$payroll->nhif_amount = Payroll::nhif($employee->id);
$payroll->other_deductions = Payroll::deductions($employee->id);
$payroll->total_deductions = Payroll::total_deductions($employee->id);
$payroll->net = Payroll::net($employee->id);
$payroll->financial_month_year = Input::get('period');
$payroll->account_id = Input::get('account');
$payroll->save();
}
$allws = DB::table('employee_allowances')->join('allowances', 'employee_allowances.allowance_id', '=', 'allowances.id')->select('employee_allowances.employee_id', 'allowance_name', 'allowance_id', 'allowance_amount')->get();
foreach ($allws as $allw) {
DB::table('transact_allowances')->insert(['employee_id' => $allw->employee_id, 'allowance_name' => $allw->allowance_name, 'allowance_id' => $allw->allowance_id, 'allowance_amount' => $allw->allowance_amount, 'financial_month_year' => Input::get('period')]);
}
$rels = DB::table('employee_relief')->join('relief', 'employee_relief.relief_id', '=', 'relief.id')->select('employee_relief.employee_id', 'relief_name', 'relief_id', 'relief_amount')->get();
foreach ($rels as $rel) {
DB::table('transact_reliefs')->insert(['employee_id' => $rel->employee_id, 'relief_name' => $rel->relief_name, 'relief_id' => $rel->relief_id, 'relief_amount' => $rel->relief_amount, 'financial_month_year' => Input::get('period')]);
}
$deds = DB::table('employee_deductions')->join('deductions', 'employee_deductions.deduction_id', '=', 'deductions.id')->select('employee_deductions.employee_id', 'deduction_name', 'deduction_id', 'deduction_amount')->get();
foreach ($deds as $ded) {
DB::table('transact_deductions')->insert(['employee_id' => $ded->employee_id, 'deduction_name' => $ded->deduction_name, 'deduction_id' => $ded->deduction_id, 'deduction_amount' => $ded->deduction_amount, 'financial_month_year' => Input::get('period')]);
}
$earns = DB::table('earnings')->select('earnings.employee_id', 'earnings_name', 'earnings_amount')->get();
foreach ($earns as $earn) {
DB::table('transact_earnings')->insert(['employee_id' => $earn->employee_id, 'earning_name' => $earn->earnings_name, 'earning_amount' => $earn->earnings_amount, 'financial_month_year' => Input::get('period')]);
}
$otimes = DB::table('overtimes')->select('overtimes.employee_id', 'type', 'rate', 'amount')->get();
foreach ($otimes as $otime) {
DB::table('transact_overtimes')->insert(['employee_id' => $otime->employee_id, 'overtime_type' => $otime->type, 'overtime_rate' => $otime->rate, 'overtime_amount' => $otime->amount, 'financial_month_year' => Input::get('period')]);
}
$period = Input::get('period');
Audit::logaudit('Payroll', 'process', 'processed payroll for ' . $period);
return Redirect::route('payroll.index')->withFlashMessage('Payroll successfully processed!');
}
示例9: destroy
/**
* Remove the specified currency from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$currency = Currency::findOrFail($id);
Currency::destroy($id);
Audit::logaudit('Currency', 'delete', 'deleted: ' . $currency->name);
return Redirect::route('currencies.index');
}
示例10: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$appraisal = Appraisal::findOrFail($id);
Appraisal::destroy($id);
Audit::logaudit('Employee Appraisal', 'delete', 'deleted: ' . $appraisal->question);
return Redirect::route('Appraisals.index')->withDeleteMessage('Employee Appraisal successfully deleted!');
}
示例11: logout
/**
* Log the user out of the application.
*
* @return Illuminate\Http\Response
*/
public function logout()
{
Audit::logaudit('System', 'logout', 'Logged out: ' . Confide::user()->username);
Confide::logout();
return Redirect::to('/');
}
示例12: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$allowance = Allowance::findOrFail($id);
Allowance::destroy($id);
Audit::logaudit('Allowances', 'delete', 'deleted: ' . $allowance->allowance_name);
return Redirect::route('allowances.index');
}
示例13: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$occurence = Occurence::findOrFail($id);
Occurence::destroy($id);
Audit::logaudit('Occurences', 'delete', 'deleted: ' . $occurence->occurence_brief);
return Redirect::route('occurences.index');
}
示例14: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$earning = Earnings::findOrFail($id);
Earnings::destroy($id);
Audit::logaudit('Earnings', 'delete', 'deleted: ' . $earning->earnings_name);
return Redirect::route('other_earnings.index');
}
示例15: destroy
/**
* Remove the specified branch from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$overtime = Overtime::findOrFail($id);
Overtime::destroy($id);
Audit::logaudit('Overtimes', 'delete', 'deleted: ' . $overtime->type);
return Redirect::route('overtimes.index')->withDeleteMessage('Employee Overtime successfully deleted!');
}