Ejemplo n.º 1
0
 /**
  * Show the form for editing the specified activity.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit(ActivitiesRepo $repo, $id)
 {
     $activity = $repo->getById($id);
     $statuses = $repo->statuses();
     // return $activity;
     return view('admin.activities.edit', compact('activity', 'statuses'));
 }
Ejemplo n.º 2
0
 public function store(Request $request, Media $media, ActivitiesRepo $activities)
 {
     $activity = $activities->getById($request->input('activity_id'));
     return $media->attach($activity, $request->file('file'));
 }