コード例 #1
0
ファイル: FilesController.php プロジェクト: sidis405/area.dev
 public function store(Request $request, Media $media, ActivitiesRepo $activities)
 {
     $activity = $activities->getById($request->input('activity_id'));
     return $media->attach($activity, $request->file('file'));
 }
コード例 #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');
 }
コード例 #3
0
ファイル: HomeController.php プロジェクト: sidis405/area.dev
 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()];
 }