public function run() { $faker = Faker::create(); foreach (range(1, 10) as $index) { Leaveapplication::create([]); } }
Route::get('erpReports/paymentmethods', 'ErpReportsController@paymentmethods'); Route::get('erpReports/payments', 'ErpReportsController@payments'); Route::get('erpReports/locations', 'ErpReportsController@locations'); Route::get('erpReports/stock', 'ErpReportsController@stock'); /* *################################################################# */ Route::group(['before' => 'process_payroll'], function () { Route::get('payrollmgmt', function () { $employees = Employee::all(); return View::make('payrollmgmt', compact('employees')); }); }); Route::group(['before' => 'leave_mgmt'], function () { Route::get('leavemgmt', function () { $leaveapplications = Leaveapplication::all(); return View::make('leavemgmt', compact('leaveapplications')); }); }); Route::get('erpmgmt', function () { return View::make('erpmgmt'); }); Route::get('cbsmgmt', function () { if (Confide::user()->user_type == 'admin') { $members = Member::all(); //print_r($members); return View::make('cbsmgmt', compact('members')); } if (Confide::user()->user_type == 'teller') { $members = Member::all(); return View::make('tellers.dashboard', compact('members'));
public static function RedeemLeaveDays($employee, $leavetype) { $payrate = $employee->basic_pay / 30; $balancedays = Leaveapplication::getBalanceDays($employee, $leavetype); $amount = $balancedays * $payrate; Earning::insert($employee->id, 'Leave earning', 'redeemed leave days', $amount); }
public function cancellations() { $leaveapplications = Leaveapplication::all(); return View::make('leaveapplications.cancelled', compact('leaveapplications')); }