예제 #1
0
 public function random()
 {
     $photo = Photo::findRandom();
     if (is_null($photo)) {
         abort(404);
     }
     return response()->json($photo);
 }