Esempio n. 1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(ActivitiesRepo $activities_repo, TextRepo $text_repo)
 {
     Session::put('current_page', 'home');
     $activities = $activities_repo->getAllFront(15);
     $featured = $activities_repo->getFeatured();
     $texts = $text_repo->getAll();
     // return $activities;
     return view('home.index', compact('activities', 'featured', 'texts'));
 }
Esempio n. 2
0
 /**
  * Update the specified activity in storage.
  *
  * @param  Request  $request
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id, TextRepo $repo)
 {
     $text = $repo->updateText($id, $request);
     flash()->success('Testo modificato con successo.');
     return redirect()->to('/admin/testi/' . $text->id . '/modifica');
 }