コード例 #1
0
 public function storeImage($id, ImageUploadRequest $request)
 {
     $article = Article::findOrFail($id);
     $image = $article->setCoverImage($request->file('file'));
     return response()->json($image);
 }
コード例 #2
0
 public function storeCoverPic($id, ImageUploadRequest $request)
 {
     $expedition = Expedition::findOrFail($id);
     $expedition->setCoverPic($request->file('file'));
     return response()->json('ok');
 }
コード例 #3
0
 public function storeImage($id, ImageUploadRequest $request)
 {
     $gallery = Gallery::findOrFail($id);
     $image = $gallery->addImage($request->file('file'));
     return response()->json(['image_id' => $image->id, 'src' => $image->getUrl(), 'thumb_src' => $image->getUrl('thumb')]);
 }
コード例 #4
0
 public function storeImage($id, ImageUploadRequest $request)
 {
     $charity = Charity::findOrFail($id);
     $image = $charity->setImage($request->file('file'));
     return response()->json($image);
 }
コード例 #5
0
 public function storeImage($id, ImageUploadRequest $request)
 {
     $sponsor = Sponsor::findOrFail($id);
     $image = $sponsor->setImage($request->file('file'));
     return response()->json($image);
 }
コード例 #6
0
 public function storeProfilePic($id, ImageUploadRequest $request)
 {
     $profile = Profile::findOrFail($id);
     $profile->setProfilePic($request->file('file'));
     return response()->json('ok');
 }