public function run() { DB::table('photo_format')->delete(); PhotoFormat::create(['format' => '4 x 6']); PhotoFormat::create(['format' => '5 x 7']); PhotoFormat::create(['format' => '8 x 10']); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $formats = PhotoFormat::all(); $album = ClientAlbum::find($id); $itemsPerPage = 12; $total_rows = ClientAlbumPhoto::where('client_album_id', '=', $id)->count(); $last = ceil($total_rows / $itemsPerPage); return View('clients.purchase_prints')->with('title', $album->album_name)->with('albumID', $id)->with('last', $last)->with('itemsPerPage', 12)->with('photo_formats', $formats)->with('orderID', ''); }
public function getAllFormats() { return response()->json(PhotoFormat::all()); }