public function run() { Model::unguard(); $this->cleanDatabase(); App\Models\Department::create(['name' => 'uc-insight']); App\Models\Department::create(['name' => 'jfs-insight']); Model::reguard(); }
$emp_doc = new App\Models\Empdoc(); $emp_doc->setConnection('mysql-hr'); $doc = $emp_doc->find($id); //header("Content-Type: application/pdf"); //echo $doc->image; $response = Response::make($doc->image, 200); $response->header('Content-Type', 'application/pdf'); //$response->header('Content-Disposition', 'attachment; filename="downloaded.pdf"'); return $response; }); get('dtr-repo/{date}', ['uses' => 'DtrController@date']); get('dtl-repo/{date}', ['uses' => 'DtrController@date']); get('slug/branch/{id}', function ($id) { //$branch = App\Models\Branch::find($id); //return str_slug($branch->address); $branches = new App\Models\Department(); 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();