Esempio n. 1
0
 public function store(Request $request, Media $media, ActivitiesRepo $activities)
 {
     $activity = $activities->getById($request->input('activity_id'));
     return $media->attach($activity, $request->file('file'));
 }
Esempio n. 2
0
 /**
  * Remove the specified activity from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroyImage(Request $request, ActivitiesRepo $repo)
 {
     $image_id = $request->input('image_id');
     $delete = $repo->removeImage($image_id);
     return json_encode('true');
 }
Esempio n. 3
0
 public function loadMoreActivities(ActivitiesRepo $activities_repo)
 {
     $activities = $activities_repo->getAll(10);
     return ['layout' => view('home.partials.activities-partial', compact('activities'))->render(), 'url' => str_replace('/?', '?', $activities->nextPageUrl()), 'more' => $activities->hasMorePages(), 'galleries' => view('home.partials.gallery-partial-main', compact('activities'))->render()];
 }