public function addShop(Request $request)
 {
     log::info('hiuhihih');
     $shopData['name'] = $request->get("name");
     $shopId = Shops::saveShop($shopData)->id;
     log::info($shopId);
     $addressData = $this->formAddress($request);
     $addressData['shop_id'] = $shopId;
     log::info($addressData);
     $locId = Address::addLocation($addressData);
     return Response::json($shopId);
 }
Exemple #2
0
 public function draftShop($data)
 {
     $data['status'] = 0;
     $shopId = Shops::create($data);
     return $shopId;
 }
 /**
  * Supression d'une offre
  */
 public function destroy($id)
 {
     $shops = Shops::findOrFail($id);
     $shops->delete();
     return redirect(action('ShopsController@index'))->with('success', 'L\'offre à bien été supprimé');
 }
 public function getReviewShops($shops_id, $limit)
 {
     $shops = new Shops();
     $data = $shops->getReviewShops($shops_id, $limit);
     return response()->json($data);
 }