return array_flatten($branches->whereNotIn('code', ['KIT'])->get(['id'])->toArray()); }); get('const', function () { return view('index'); }); get('sessions', function () { return session()->all(); }); get('flush-sessions', function () { Session::flush(); return redirect('sessions'); }); get('test-event', ['uses' => 'UploadController@test']); get('manday-count', function () { //$manday = App\Models\Manskedday::with('countMandtls')->where('date', '2015-11-13')->first(); $manday = App\Models\Manskedday::with('countMandtls')->where('date', '2015-11-13')->first(); return $manday; }); get('folder/{f}', function ($f) { $f = '.'; return '/' . trim(str_replace('..', '', $f), '/'); }); get('mandtl-scope/{employeeid}/{date}', function ($employeeid, $date) { $branch = App\Models\Manskeddtl::with('employee')->whereEmployeeid($employeeid)->date($date)->get(); //$branch = App\Models\Manskeddtl::whereEmployeeid($employeeid)->first()->manskedday()->where('date', '2015-11-13')->first(); return $branch; }); get('timelogs/{employeeid}/{date}', function ($employeeid, $date) { //$timelogs = App\Models\Timelog::employeeid($employeeid)->date($date)->get(); //$branch = App\Models\Manskeddtl::whereEmployeeid($employeeid)->first()->manskedday()->where('date', '2015-11-13')->first(); $date = Carbon\Carbon::parse($date);
return dd($lastday->getDaysByWeekNo('01', '2016')); $week_number = '01'; $year = '2015'; for ($day = 1; $day <= 7; $day++) { echo date('m/d/Y', strtotime($year . "W" . $week_number . $day)) . "<br>"; } }); get('t/get-week', ['uses' => 'ManskedController@testWeeks']); get('t/mansked/week/{weekno}', function ($weekno) { $mansked = App\Models\Manskedhdr::with('manskeddays')->select('id')->where('weekno', $weekno)->get()->first(); return $mansked->manskeddays->keyBy('date'); $manday = new App\Models\Manskedday(); return $manday->where('id', 'B0092A7B666611E596ECDA40B3C0AA12')->get(); }); get('t/manday-dtl', function () { $manday = new App\Models\Manskedday(); $manday->date = '20015-10-07'; $manday->manskedid = 'A7AECDD2666611E596ECDA40B3C0AA12'; $manday->id = $manday->get_uid(); $manday->save(); $x = new App\Models\Manskeddtl(); $x->daytype = 0; $x->id = $x->get_uid(); $manday->manskeddtls()->save($x); return dd($manday); }); /*************************************************************************************/ /******************** Data Manipulation for Migrations *****************************/ /*************************************************************************************/ get('compcat-expense', function () { $compcats = App\Models\Compcat::all();