Esempio n. 1
0
 public function index(Manager $fractal, ReferenceTransformer $referenceTransformer)
 {
     // show all
     $records = Reference::all();
     $collection = new Collection($records, $referenceTransformer);
     $data = $fractal->createData($collection)->toArray();
     return $this->respond($data);
 }
Esempio n. 2
0
 /**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function home()
 {
     // Some general statistics
     $notes = Note::all();
     $noteCount = count($notes);
     $references = Reference::all();
     $referenceCount = count($references);
     $tags = Tag::all();
     $tagCount = count($tags);
     $outlines = Outline::all();
     $outlineCount = count($outlines);
     return view('app.main', compact('noteCount', 'referenceCount', 'tagCount', 'outlineCount'));
 }
 public function getIndex()
 {
     $references = Reference::all();
     return view('reference/index', ['references' => $references]);
 }