/** * Get all of the Documents for a given user. * * @param User $user * @return Collection */ public function forUser(User $user) { return Document::all(); //('user_id', $user->id) //->orderBy('created_at', 'asc') //->get(); }
public function index() { if (!$this->objLoggedInUser->HasPermission('View/Documents')) { abort('404'); } $tDocuments = \App\Document::all(); View::share('tDocuments', $tDocuments); return view('admin.documents.index'); }
/** * Execute the console command. * * @return mixed */ public function handle() { $documents = \App\Document::all(); foreach ($documents as $document) { $path = base_path('docs' . DIRECTORY_SEPARATOR . $document->name); $document->content = \File::get($path); $document->save(); $document->touch(); $this->info(sprintf('Success updating %d: %s', $document->id, $document->name)); } $this->warn('Finished.'); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $documents = Document::all(); return view('documents.index', compact('documents')); }
public static function documents($type = null, $data = null) { if ($type and $data) { return Document::where($type, $data)->get(); } return Document::all(); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $arr = \App\Document::all(); return view('review.index')->withListing($arr); }