/**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request, $orgId)
 {
     $restaurant = new \App\Restaurant();
     $restaurant->fill($request->input('Restaurant', []));
     if ($restaurant->isValid()) {
         $restaurant->save();
         return redirect()->route('restaurant.index', ['orgId' => $orgId]);
     } else {
         return redirect()->route('restaurant.create')->withErrors($restaurant->getErrors())->withInput();
     }
 }
 public function addRestaurant(Request $request, $orgId, $id)
 {
     $organization = Organization::find($orgId);
     $restaurant = Restaurant::find($id);
     $organization->restaurants()->save($restaurant);
     return redirect()->route('restaurant.index', ['orgId' => $orgId]);
 }
 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 30) as $index) {
         Restaurant::create(['name' => $faker->name, 'address' => $faker->address, 'email' => $faker->email, 'oc_time' => $faker->word, 'description' => $faker->paragraph(3), 'mob_phone' => $faker->randomNumber(5), 'land_phone' => $faker->randomNumber(5), 'lat' => $faker->latitude, 'lng' => $faker->longitude, 'veg' => $faker->boolean(50)]);
     }
 }
Exemple #4
0
 public function storeRestaurant(Request $request, $id)
 {
     $poll = \App\Poll::findOrFail($id);
     $restaurant = Restaurant::findOrFail($request->input('restaurant_id'));
     $poll->restaurants()->save($restaurant);
     return redirect()->route('poll.index', ['orgId' => $poll->organization_id]);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(CreateRatingRequest $request, $id)
 {
     $restaurant = Restaurant::findOrFail($id);
     $rating = new Rating();
     $rating->fill($request->input());
     $rating->restaurant()->associate($restaurant);
     $rating->save();
     return $restaurant;
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS=0');
     Restaurant::truncate();
     DB::statement('SET FOREIGN_KEY_CHECKS=1');
     Model::unguard();
     // $this->call(UserTableSeeder::class);
     $this->call('RestaurantsTableSeeder');
     Model::reguard();
 }
Exemple #7
0
 public function run()
 {
     Artisan::call('migrate:refresh');
     $user = \App\User::create(['email' => '*****@*****.**', 'password' => '$2y$10$zhRDGljo5k5jn6oifVCA7.4GzB6OKmV1QkJfvErtcheR0m5jMLK9S', 'firstName' => 'ftesting1', 'lastName' => 'ltesting1']);
     $restaurant = \App\Restaurant::create(['name' => 'Burger King']);
     $organization = \App\Organization::create(['name' => 'Testing1']);
     $poll = \App\Poll::create(['closed_at' => '2017-05-18 03:00:00', 'closed_by' => '2017-05-18 04:00:00', 'organization_id' => 1]);
     $organization->restaurants()->save($restaurant);
     $poll->restaurants()->save($restaurant);
     $role = \App\Role::create(['user_id' => 1, 'organization_id' => 1, 'role' => 'Tester']);
     $organization_order = \App\OrganizationOrder::create(['organization_restaurant_id' => 1, 'due_by' => '2017-05-18 04:00:00', 'closed_at' => '2017-05-18 03:00:00']);
     $user_order = \App\UserOrder::create(['user_id' => 1, 'restaurant_id' => 1, 'default' => 1, 'order' => 'Test Burger']);
     $polloption = \App\PollRestaurant::find(1);
     $polloption->users()->save($user);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request, $orgId)
 {
     $organization = \App\Organization::findOrFail($orgId);
     $restaurants = Restaurant::orderBy('name')->get();
     foreach ($restaurants as $restaurant) {
         $restaurant->is_used = false;
         if (count($organization->restaurants) > 0) {
             foreach ($organization->restaurants as $orgRest) {
                 if ($orgRest->id == $restaurant->id) {
                     $restaurant->is_used = true;
                 }
             }
         }
     }
     return view('restaurants.list', ['restaurants' => $restaurants, 'organization' => $organization]);
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $restaurant = Restaurant::find($id);
     if (!$restaurant) {
         return $this->respondNotFound('Restaurant does not exist.');
         /*return Response::json([
               'error' => [
                   'message'       => 'Restaurant does not exist.',
                   'status_code'   => 404
               ]
           ], 404);*/
     }
     return $this->respond(['data' => $this->fractal->item($restaurant, new RestaurantTransformer())]);
     /*return Response::json([
     
                 'data' => $this->restaurantTransformer->transform($restaurant)
             ], 200);*/
 }
 public function run()
 {
     Model::unguard();
     DB::table('provinces')->delete();
     DB::table('cities')->delete();
     DB::table('roles')->delete();
     DB::table('prices')->delete();
     DB::table('users')->delete();
     DB::table('restaurants')->delete();
     DB::table('specialities')->delete();
     $provinces = array(['id' => 1, 'name' => 'Girona'], ['id' => 2, 'name' => 'Barcelona'], ['id' => 3, 'name' => 'Tarragona'], ['id' => 4, 'name' => 'Lleida']);
     $cities = array(['name' => 'Agullana', 'province_id' => 1], ['name' => 'Aiguaviva', 'province_id' => 1], ['name' => 'Albanyà', 'province_id' => 1], ['name' => 'Albons', 'province_id' => 1], ['name' => 'Alp', 'province_id' => 1], ['name' => 'Amer', 'province_id' => 1], ['name' => 'Anglès', 'province_id' => 1], ['name' => 'Arbúcies', 'province_id' => 1], ['name' => 'Argelaguer', 'province_id' => 1], ['name' => 'Avinyonet de Puigventós', 'province_id' => 1], ['name' => 'Banyoles', 'province_id' => 1], ['name' => 'Bàscara', 'province_id' => 1], ['name' => 'Begur', 'province_id' => 1], ['name' => 'Bellcaire d´Empordà', 'province_id' => 1], ['name' => 'Besalú', 'province_id' => 1], ['name' => 'Bescanó', 'province_id' => 1], ['name' => 'Beuda', 'province_id' => 1], ['name' => 'Biure', 'province_id' => 1], ['name' => 'Blanes', 'province_id' => 1], ['name' => 'Boadella i les Escaules', 'province_id' => 1], ['name' => 'Bolvir', 'province_id' => 1], ['name' => 'Bordils', 'province_id' => 1], ['name' => 'Borrassà', 'province_id' => 1], ['name' => 'Breda', 'province_id' => 1], ['name' => 'Brunyola', 'province_id' => 1], ['name' => 'Cabanelles', 'province_id' => 1], ['name' => 'Cabanes', 'province_id' => 1], ['name' => 'Cadaqués', 'province_id' => 1], ['name' => 'Caldes de Malavella', 'province_id' => 1], ['name' => 'Calonge i Sant Antoni', 'province_id' => 1], ['name' => 'Camós', 'province_id' => 1], ['name' => 'Campdevànol', 'province_id' => 1], ['name' => 'Campelles', 'province_id' => 1], ['name' => 'Campllong', 'province_id' => 1], ['name' => 'Camprodon', 'province_id' => 1], ['name' => 'Canet d´Adri', 'province_id' => 1], ['name' => 'Cantallops', 'province_id' => 1], ['name' => 'Capmany', 'province_id' => 1], ['name' => 'Cassà de la Selva', 'province_id' => 1], ['name' => 'CastellPlatja d\'Aro', 'province_id' => 1], ['name' => 'Castellfollit de la Roca', 'province_id' => 1], ['name' => 'Castelló d´Empúries', 'province_id' => 1], ['name' => 'Celrà', 'province_id' => 1], ['name' => 'Cervià de Ter', 'province_id' => 1], ['name' => 'Cistella', 'province_id' => 1], ['name' => 'Colera', 'province_id' => 1], ['name' => 'Colomers', 'province_id' => 1], ['name' => 'Corçà', 'province_id' => 1], ['name' => 'Cornellà del Terri', 'province_id' => 1], ['name' => 'Crespià', 'province_id' => 1], ['name' => 'Cruïlles, Monells i Sant Sadurní de l´Heura', 'province_id' => 1], ['name' => 'Darnius', 'province_id' => 1], ['name' => 'Das', 'province_id' => 1], ['name' => 'el Far d´Empordà', 'province_id' => 1], ['name' => 'El Port de la Selva', 'province_id' => 1], ['name' => 'Espinelves', 'province_id' => 1], ['name' => 'Espolla', 'province_id' => 1], ['name' => 'Esponellà', 'province_id' => 1], ['name' => 'Figueres', 'province_id' => 1], ['name' => 'Flaçà', 'province_id' => 1], ['name' => 'Foixà', 'province_id' => 1], ['name' => 'Fontanals de Cerdanya', 'province_id' => 1], ['name' => 'Fontanilles', 'province_id' => 1], ['name' => 'Fontcoberta', 'province_id' => 1], ['name' => 'Forallac', 'province_id' => 1], ['name' => 'Fornells de la Selva', 'province_id' => 1], ['name' => 'Fortià', 'province_id' => 1], ['name' => 'Garrigàs', 'province_id' => 1], ['name' => 'Garrigoles', 'province_id' => 1], ['name' => 'Garriguella', 'province_id' => 1], ['name' => 'Ger', 'province_id' => 1], ['name' => 'Girona', 'province_id' => 1], ['name' => 'Gombrèn', 'province_id' => 1], ['name' => 'Gualta', 'province_id' => 1], ['name' => 'Guils de Cerdanya', 'province_id' => 1], ['name' => 'Hostalric', 'province_id' => 1], ['name' => 'Isòvol', 'province_id' => 1], ['name' => 'Jafre', 'province_id' => 1], ['name' => 'Juià', 'province_id' => 1], ['name' => 'La Bisbal d´Empordà', 'province_id' => 1], ['name' => 'La Cellera de Ter', 'province_id' => 1], ['name' => 'La Jonquera', 'province_id' => 1], ['name' => 'La Pera', 'province_id' => 1], ['name' => 'La Selva de Mar', 'province_id' => 1], ['name' => 'La Tallada d´Empordà', 'province_id' => 1], ['name' => 'La Vajol', 'province_id' => 1], ['name' => 'La Vall de Bianya', 'province_id' => 1], ['name' => 'La Vall d´en Bas', 'province_id' => 1], ['name' => 'Les Llosses', 'province_id' => 1], ['name' => 'Les Planes d´Hostoles', 'province_id' => 1], ['name' => 'Les Preses', 'province_id' => 1], ['name' => 'Lladó', 'province_id' => 1], ['name' => 'Llagostera', 'province_id' => 1], ['name' => 'Llambilles', 'province_id' => 1], ['name' => 'Llanars', 'province_id' => 1], ['name' => 'Llançà', 'province_id' => 1], ['name' => 'Llers', 'province_id' => 1], ['name' => 'Llívia', 'province_id' => 1], ['name' => 'Lloret de Mar', 'province_id' => 1], ['name' => 'L´Armentera', 'province_id' => 1], ['name' => 'L´Escala', 'province_id' => 1], ['name' => 'Maçanet de Cabrenys', 'province_id' => 1], ['name' => 'Maçanet de la Selva', 'province_id' => 1], ['name' => 'Madremanya', 'province_id' => 1], ['name' => 'Maià de Montcal', 'province_id' => 1], ['name' => 'Masarac', 'province_id' => 1], ['name' => 'Massanes', 'province_id' => 1], ['name' => 'Meranges', 'province_id' => 1], ['name' => 'Mieres', 'province_id' => 1], ['name' => 'Mollet de Peralada', 'province_id' => 1], ['name' => 'Molló', 'province_id' => 1], ['name' => 'Montras', 'province_id' => 1], ['name' => 'Montagut i Oix', 'province_id' => 1], ['name' => 'Navata', 'province_id' => 1], ['name' => 'Ogassa', 'province_id' => 1], ['name' => 'Olot', 'province_id' => 1], ['name' => 'Ordis', 'province_id' => 1], ['name' => 'Osor', 'province_id' => 1], ['name' => 'Palafrugell', 'province_id' => 1], ['name' => 'Palamós', 'province_id' => 1], ['name' => 'Palau de Santa Eulàlia', 'province_id' => 1], ['name' => 'Palausator', 'province_id' => 1], ['name' => 'Palausaverdera', 'province_id' => 1], ['name' => 'Palol de Revardit', 'province_id' => 1], ['name' => 'Pals', 'province_id' => 1], ['name' => 'Pardines', 'province_id' => 1], ['name' => 'Parlavà', 'province_id' => 1], ['name' => 'Pau', 'province_id' => 1], ['name' => 'Pedret i Marzà', 'province_id' => 1], ['name' => 'Peralada', 'province_id' => 1], ['name' => 'Planoles', 'province_id' => 1], ['name' => 'Pont de Molins', 'province_id' => 1], ['name' => 'Pontós', 'province_id' => 1], ['name' => 'Porqueres', 'province_id' => 1], ['name' => 'Portbou', 'province_id' => 1], ['name' => 'Puigcerdà', 'province_id' => 1], ['name' => 'Quart', 'province_id' => 1], ['name' => 'Queralbs', 'province_id' => 1], ['name' => 'Rabós', 'province_id' => 1], ['name' => 'Regencós', 'province_id' => 1], ['name' => 'Ribes de Freser', 'province_id' => 1], ['name' => 'Riells i Viabrea', 'province_id' => 1], ['name' => 'Ripoll', 'province_id' => 1], ['name' => 'Riudarenes', 'province_id' => 1], ['name' => 'Riudaura', 'province_id' => 1], ['name' => 'Riudellots de la Selva', 'province_id' => 1], ['name' => 'Riumors', 'province_id' => 1], ['name' => 'Roses', 'province_id' => 1], ['name' => 'Rupià', 'province_id' => 1], ['name' => 'Sales de Llierca', 'province_id' => 1], ['name' => 'Salt', 'province_id' => 1], ['name' => 'Sant Andreu Salou', 'province_id' => 1], ['name' => 'Sant Aniol de Finestres', 'province_id' => 1], ['name' => 'Sant Climent Sescebes', 'province_id' => 1], ['name' => 'Sant Feliu de Buixalleu', 'province_id' => 1], ['name' => 'Sant Feliu de Guíxols', 'province_id' => 1], ['name' => 'Sant Feliu de Pallerols', 'province_id' => 1], ['name' => 'Sant Ferriol', 'province_id' => 1], ['name' => 'Sant Gregori', 'province_id' => 1], ['name' => 'Sant Hilari Sacalm', 'province_id' => 1], ['name' => 'Sant Jaume de Llierca', 'province_id' => 1], ['name' => 'Sant Joan de les Abadesses', 'province_id' => 1], ['name' => 'Sant Joan de Mollet', 'province_id' => 1], ['name' => 'Sant Joan les Fonts', 'province_id' => 1], ['name' => 'Sant Jordi Desvalls', 'province_id' => 1], ['name' => 'Sant Julià de Ramis', 'province_id' => 1], ['name' => 'Sant Julià del Llor i Bonmatí', 'province_id' => 1], ['name' => 'Sant Llorenç de la Muga', 'province_id' => 1], ['name' => 'Sant Martí de Llémena', 'province_id' => 1], ['name' => 'Sant Martí Vell', 'province_id' => 1], ['name' => 'Sant Miquel de Campmajor', 'province_id' => 1], ['name' => 'Sant Miquel de Fluvià', 'province_id' => 1], ['name' => 'Sant Mori', 'province_id' => 1], ['name' => 'Sant Pau de Segúries', 'province_id' => 1], ['name' => 'Sant Pere Pescador', 'province_id' => 1], ['name' => 'Santa Coloma de Farners', 'province_id' => 1], ['name' => 'Santa Cristina d´Aro', 'province_id' => 1], ['name' => 'Santa Llogaia d´Alguema', 'province_id' => 1], ['name' => 'Santa Pau', 'province_id' => 1], ['name' => 'Sarrià de Ter', 'province_id' => 1], ['name' => 'Saus, Camallera i Llampaies', 'province_id' => 1], ['name' => 'Serinyà', 'province_id' => 1], ['name' => 'Serra de Daró', 'province_id' => 1], ['name' => 'Setcases', 'province_id' => 1], ['name' => 'Sils', 'province_id' => 1], ['name' => 'Siurana', 'province_id' => 1], ['name' => 'Susqueda', 'province_id' => 1], ['name' => 'Terrades', 'province_id' => 1], ['name' => 'Torrent', 'province_id' => 1], ['name' => 'Torroella de Fluvià', 'province_id' => 1], ['name' => 'Torroella de Montgrí i l´Estartit', 'province_id' => 1], ['name' => 'Tortellà', 'province_id' => 1], ['name' => 'Toses', 'province_id' => 1], ['name' => 'Tossa de Mar', 'province_id' => 1], ['name' => 'Ullà', 'province_id' => 1], ['name' => 'Ullastret', 'province_id' => 1], ['name' => 'Ultramort', 'province_id' => 1], ['name' => 'Urús', 'province_id' => 1], ['name' => 'Vallllobrega', 'province_id' => 1], ['name' => 'Vallfogona de Ripollès', 'province_id' => 1], ['name' => 'Ventalló', 'province_id' => 1], ['name' => 'Verges', 'province_id' => 1], ['name' => 'Vidrà', 'province_id' => 1], ['name' => 'Vidreres', 'province_id' => 1], ['name' => 'Vilasacra', 'province_id' => 1], ['name' => 'Vilabertran', 'province_id' => 1], ['name' => 'Vilablareix', 'province_id' => 1], ['name' => 'Viladamat', 'province_id' => 1], ['name' => 'Viladasens', 'province_id' => 1], ['name' => 'Vilademuls', 'province_id' => 1], ['name' => 'Viladrau', 'province_id' => 1], ['name' => 'Vilafant', 'province_id' => 1], ['name' => 'Vilajuïga', 'province_id' => 1], ['name' => 'Vilallonga de Ter', 'province_id' => 1], ['name' => 'Vilamacolum', 'province_id' => 1], ['name' => 'Vilamalla', 'province_id' => 1], ['name' => 'Vilamaniscle', 'province_id' => 1], ['name' => 'Vilanant', 'province_id' => 1], ['name' => 'Vilaür', 'province_id' => 1], ['name' => 'Vilobí d´Onyar', 'province_id' => 1], ['name' => 'Vilopriu', 'province_id' => 1], ['name' => 'Abrera', 'province_id' => 2], ['name' => 'Aguilar de Segarra', 'province_id' => 2], ['name' => 'Aiguafreda', 'province_id' => 2], ['name' => 'Alella', 'province_id' => 2], ['name' => 'Alpens', 'province_id' => 2], ['name' => 'Arenys de Mar', 'province_id' => 2], ['name' => 'Arenys de Munt', 'province_id' => 2], ['name' => 'Argençola', 'province_id' => 2], ['name' => 'Argentona', 'province_id' => 2], ['name' => 'Artés', 'province_id' => 2], ['name' => 'Avià', 'province_id' => 2], ['name' => 'Avinyó', 'province_id' => 2], ['name' => 'Avinyonet del Penedès', 'province_id' => 2], ['name' => 'Badalona', 'province_id' => 2], ['name' => 'Badia del Vallès', 'province_id' => 2], ['name' => 'Bagà', 'province_id' => 2], ['name' => 'Balenyà', 'province_id' => 2], ['name' => 'Balsareny', 'province_id' => 2], ['name' => 'Barberà del Vallès', 'province_id' => 2], ['name' => 'Barcelona', 'province_id' => 2], ['name' => 'Begues', 'province_id' => 2], ['name' => 'Bellprat', 'province_id' => 2], ['name' => 'Berga', 'province_id' => 2], ['name' => 'Bigues i Riells', 'province_id' => 2], ['name' => 'Borredà', 'province_id' => 2], ['name' => 'Cabrera d\'Anoia', 'province_id' => 2], ['name' => 'Cabrera de Mar', 'province_id' => 2], ['name' => 'Cabrils', 'province_id' => 2], ['name' => 'Calaf', 'province_id' => 2], ['name' => 'Calders', 'province_id' => 2], ['name' => 'Caldes d\'Estrac', 'province_id' => 2], ['name' => 'Caldes de Montbui', 'province_id' => 2], ['name' => 'Calella', 'province_id' => 2], ['name' => 'Calldetenes', 'province_id' => 2], ['name' => 'Callús', 'province_id' => 2], ['name' => 'Calonge de Segarra', 'province_id' => 2], ['name' => 'Campins', 'province_id' => 2], ['name' => 'Canet de Mar', 'province_id' => 2], ['name' => 'Canovelles', 'province_id' => 2], ['name' => 'Cànoves i Samalús', 'province_id' => 2], ['name' => 'Canyelles', 'province_id' => 2], ['name' => 'Capellades', 'province_id' => 2], ['name' => 'Capolat', 'province_id' => 2], ['name' => 'Cardedeu', 'province_id' => 2], ['name' => 'Cardona', 'province_id' => 2], ['name' => 'Carme', 'province_id' => 2], ['name' => 'Casserres', 'province_id' => 2], ['name' => 'Castell de l\'Areny', 'province_id' => 2], ['name' => 'Castellar de n\'Hug', 'province_id' => 2], ['name' => 'Castellar del Riu', 'province_id' => 2], ['name' => 'Castellar del Vallès', 'province_id' => 2], ['name' => 'Castellbell i el Vilar', 'province_id' => 2], ['name' => 'Castellbisbal', 'province_id' => 2], ['name' => 'Castellcir', 'province_id' => 2], ['name' => 'Castelldefels', 'province_id' => 2], ['name' => 'Castellet i la Gornal', 'province_id' => 2], ['name' => 'Castellfollit de Riubregós', 'province_id' => 2], ['name' => 'Castellfullit del Boix', 'province_id' => 2], ['name' => 'Castellgalí', 'province_id' => 2], ['name' => 'Castellnou de Bages', 'province_id' => 2], ['name' => 'Castellolí', 'province_id' => 2], ['name' => 'Castellterçol', 'province_id' => 2], ['name' => 'Castellví de la Marca', 'province_id' => 2], ['name' => 'Castellví de Rosanes', 'province_id' => 2], ['name' => 'Centelles', 'province_id' => 2], ['name' => 'Cercs', 'province_id' => 2], ['name' => 'Cerdanyola del Vallès', 'province_id' => 2], ['name' => 'Cervelló', 'province_id' => 2], ['name' => 'Collbató', 'province_id' => 2], ['name' => 'Collsuspina', 'province_id' => 2], ['name' => 'Copons', 'province_id' => 2], ['name' => 'Corbera de Llobregat', 'province_id' => 2], ['name' => 'Cornellà de Llobregat', 'province_id' => 2], ['name' => 'Cubelles', 'province_id' => 2], ['name' => 'Dosrius', 'province_id' => 2], ['name' => 'El Bruc', 'province_id' => 2], ['name' => 'El Brull', 'province_id' => 2], ['name' => 'El Masnou', 'province_id' => 2], ['name' => 'El Pla del Penedès', 'province_id' => 2], ['name' => 'El Prat de Llobregat', 'province_id' => 2], ['name' => 'Els Hostalets de Pierola', 'province_id' => 2], ['name' => 'Els Prats de Rei', 'province_id' => 2], ['name' => 'Esparreguera', 'province_id' => 2], ['name' => 'Esplugues de Llobregat', 'province_id' => 2], ['name' => 'Figaró-Montmany', 'province_id' => 2], ['name' => 'Fígols', 'province_id' => 2], ['name' => 'Fogars de la Selva', 'province_id' => 2], ['name' => 'Fogars de Montclús', 'province_id' => 2], ['name' => 'Folgueroles', 'province_id' => 2], ['name' => 'Fonollosa', 'province_id' => 2], ['name' => 'Fontrubí', 'province_id' => 2], ['name' => 'Gaià', 'province_id' => 2], ['name' => 'Gallifa', 'province_id' => 2], ['name' => 'Gavà', 'province_id' => 2], ['name' => 'Gelida', 'province_id' => 2], ['name' => 'Gironella', 'province_id' => 2], ['name' => 'Gisclareny', 'province_id' => 2], ['name' => 'Granera', 'province_id' => 2], ['name' => 'Granollers', 'province_id' => 2], ['name' => 'Gualba', 'province_id' => 2], ['name' => 'Guardiola de Berguedà', 'province_id' => 2], ['name' => 'Gurb', 'province_id' => 2], ['name' => 'Igualada', 'province_id' => 2], ['name' => 'Jorba', 'province_id' => 2], ['name' => 'l\'Ametlla del Vallès', 'province_id' => 2], ['name' => 'L\'Espunyola', 'province_id' => 2], ['name' => 'L\'Estany', 'province_id' => 2], ['name' => 'L\'Hospitalet de Llobregat', 'province_id' => 2], ['name' => 'La Garriga', 'province_id' => 2], ['name' => 'La Granada', 'province_id' => 2], ['name' => 'La Llacuna', 'province_id' => 2], ['name' => 'La Llagosta', 'province_id' => 2], ['name' => 'La Nou de Berguedà', 'province_id' => 2], ['name' => 'La Pobla de Claramunt', 'province_id' => 2], ['name' => 'La Quar', 'province_id' => 2], ['name' => 'La Roca del Vallès', 'province_id' => 2], ['name' => 'Les Cabanyes', 'province_id' => 2], ['name' => 'Les Franqueses del Vallès', 'province_id' => 2], ['name' => 'Les Masies de Roda', 'province_id' => 2], ['name' => 'Les Masíes de Voltregà', 'province_id' => 2], ['name' => 'Lliçà d\'Amunt', 'province_id' => 2], ['name' => 'Lliçà de Vall', 'province_id' => 2], ['name' => 'Llinars del Vallès', 'province_id' => 2], ['name' => 'Lluçà', 'province_id' => 2], ['name' => 'Malgrat de Mar', 'province_id' => 2], ['name' => 'Malla', 'province_id' => 2], ['name' => 'Manlleu', 'province_id' => 2], ['name' => 'Manresa', 'province_id' => 2], ['name' => 'Marganell', 'province_id' => 2], ['name' => 'Martorell', 'province_id' => 2], ['name' => 'Martorelles', 'province_id' => 2], ['name' => 'Masquefa', 'province_id' => 2], ['name' => 'Matadepera', 'province_id' => 2], ['name' => 'Mataró', 'province_id' => 2], ['name' => 'Mediona', 'province_id' => 2], ['name' => 'Moià', 'province_id' => 2], ['name' => 'Molins de Rei', 'province_id' => 2], ['name' => 'Mollet del Vallès', 'province_id' => 2], ['name' => 'Monistrol de Calders', 'province_id' => 2], ['name' => 'Monistrol de Montserrat', 'province_id' => 2], ['name' => 'Montcada i Reixac', 'province_id' => 2], ['name' => 'Montclar', 'province_id' => 2], ['name' => 'Montesquiu', 'province_id' => 2], ['name' => 'Montgat', 'province_id' => 2], ['name' => 'Montmajor', 'province_id' => 2], ['name' => 'Montmaneu', 'province_id' => 2], ['name' => 'Montmeló', 'province_id' => 2], ['name' => 'Montornès del Vallès', 'province_id' => 2], ['name' => 'Montseny', 'province_id' => 2], ['name' => 'Muntanyola', 'province_id' => 2], ['name' => 'Mura', 'province_id' => 2], ['name' => 'Navarcles', 'province_id' => 2], ['name' => 'Navas', 'province_id' => 2], ['name' => 'Òdena', 'province_id' => 2], ['name' => 'Olèrdola', 'province_id' => 2], ['name' => 'Olesa de Bonesvalls', 'province_id' => 2], ['name' => 'Olesa de Montserrat', 'province_id' => 2], ['name' => 'Olivella', 'province_id' => 2], ['name' => 'Olost', 'province_id' => 2], ['name' => 'Olvan', 'province_id' => 2], ['name' => 'Orís', 'province_id' => 2], ['name' => 'Oristà', 'province_id' => 2], ['name' => 'Orpí', 'province_id' => 2], ['name' => 'Òrrius', 'province_id' => 2], ['name' => 'Pacs del Penedès', 'province_id' => 2], ['name' => 'Palafolls', 'province_id' => 2], ['name' => 'Palau-solità i Plegamans', 'province_id' => 2], ['name' => 'Pallejà', 'province_id' => 2], ['name' => 'Palma de Cervelló', 'province_id' => 2], ['name' => 'Papiol', 'province_id' => 2], ['name' => 'Parets del Vallès', 'province_id' => 2], ['name' => 'Perafita', 'province_id' => 2], ['name' => 'Piera', 'province_id' => 2], ['name' => 'Pineda de Mar', 'province_id' => 2], ['name' => 'Pobla de Lillet', 'province_id' => 2], ['name' => 'Polinyà', 'province_id' => 2], ['name' => 'Pont de Vilomara i Rocafort', 'province_id' => 2], ['name' => 'Pontons', 'province_id' => 2], ['name' => 'Prats de Lluçanès', 'province_id' => 2], ['name' => 'Premià de Dalt', 'province_id' => 2], ['name' => 'Premià de Mar', 'province_id' => 2], ['name' => 'Puig-reig', 'province_id' => 2], ['name' => 'Puigdàlber', 'province_id' => 2], ['name' => 'Pujalt', 'province_id' => 2], ['name' => 'Rajadell', 'province_id' => 2], ['name' => 'Rellinars', 'province_id' => 2], ['name' => 'Ripollet', 'province_id' => 2], ['name' => 'Roda de Ter', 'province_id' => 2], ['name' => 'Rubí', 'province_id' => 2], ['name' => 'Rubió', 'province_id' => 2], ['name' => 'Rupit i Pruit', 'province_id' => 2], ['name' => 'Sabadell', 'province_id' => 2], ['name' => 'Sagàs', 'province_id' => 2], ['name' => 'Saldes', 'province_id' => 2], ['name' => 'Sallent', 'province_id' => 2], ['name' => 'Sant Adrià de Besòs', 'province_id' => 2], ['name' => 'Sant Agustí de Lluçanès', 'province_id' => 2], ['name' => 'Sant Andreu de la Barca', 'province_id' => 2], ['name' => 'Sant Andreu de Llavaneres', 'province_id' => 2], ['name' => 'Sant Antoni de Vilamajor', 'province_id' => 2], ['name' => 'Sant Bartomeu del Grau', 'province_id' => 2], ['name' => 'Sant Boi de Llobregat', 'province_id' => 2], ['name' => 'Sant Boi de Lluçanès', 'province_id' => 2], ['name' => 'Sant Cebrià de Vallalta', 'province_id' => 2], ['name' => 'Sant Celoni', 'province_id' => 2], ['name' => 'Sant Climent de Llobregat', 'province_id' => 2], ['name' => 'Sant Cugat del Vallès', 'province_id' => 2], ['name' => 'Sant Cugat Sesgarrigues', 'province_id' => 2], ['name' => 'Sant Esteve de Palautordera', 'province_id' => 2], ['name' => 'Sant Esteve Sesrovires', 'province_id' => 2], ['name' => 'Sant Feliu de Codines', 'province_id' => 2], ['name' => 'Sant Feliu de Llobregat', 'province_id' => 2], ['name' => 'Sant Feliu Sasserra', 'province_id' => 2], ['name' => 'Sant Fost de Campsentelles', 'province_id' => 2], ['name' => 'Sant Fruitós de Bages', 'province_id' => 2], ['name' => 'Sant Hipòlit de Voltregà', 'province_id' => 2], ['name' => 'Sant Iscle de Vallalta', 'province_id' => 2], ['name' => 'Sant Jaume de Frontanyà', 'province_id' => 2], ['name' => 'Sant Joan de Vilatorrada', 'province_id' => 2], ['name' => 'Sant Joan Despí', 'province_id' => 2], ['name' => 'Sant Julià de Cerdanyola', 'province_id' => 2], ['name' => 'Sant Julià de Vilatorta', 'province_id' => 2], ['name' => 'Sant Just Desvern', 'province_id' => 2], ['name' => 'Sant Llorenç d\'Hortons', 'province_id' => 2], ['name' => 'Sant Llorenç Savall', 'province_id' => 2], ['name' => 'Sant Martí d\'Albars', 'province_id' => 2], ['name' => 'Sant Martí de Centelles', 'province_id' => 2], ['name' => 'Sant Martí de Tous', 'province_id' => 2], ['name' => 'Sant Martí Sarroca', 'province_id' => 2], ['name' => 'Sant Martí Sesgueioles', 'province_id' => 2], ['name' => 'Sant Mateu de Bages', 'province_id' => 2], ['name' => 'Sant Pere de Ribes', 'province_id' => 2], ['name' => 'Sant Pere de Riudebitlles', 'province_id' => 2], ['name' => 'Sant Pere de Torelló', 'province_id' => 2], ['name' => 'Sant Pere de Vilamajor', 'province_id' => 2], ['name' => 'Sant Pere Sallavinera', 'province_id' => 2], ['name' => 'Sant Pol de Mar', 'province_id' => 2], ['name' => 'Sant Quintí de Mediona', 'province_id' => 2], ['name' => 'Sant Quirze de Besora', 'province_id' => 2], ['name' => 'Sant Quirze del Vallès', 'province_id' => 2], ['name' => 'Sant Quirze Safaja', 'province_id' => 2], ['name' => 'Sant Sadurní d\'Anoia', 'province_id' => 2], ['name' => 'Sant Sadurní d\'Osormort', 'province_id' => 2], ['name' => 'Sant Salvador de Guardiola', 'province_id' => 2], ['name' => 'Sant Vicenç de Castellet', 'province_id' => 2], ['name' => 'Sant Vicenç de Montalt', 'province_id' => 2], ['name' => 'Sant Vicenç de Torelló', 'province_id' => 2], ['name' => 'Sant Vicenç dels Horts', 'province_id' => 2], ['name' => 'Santa Cecília de Voltregà', 'province_id' => 2], ['name' => 'Santa Coloma de Cervelló', 'province_id' => 2], ['name' => 'Santa Coloma de Gramenet', 'province_id' => 2], ['name' => 'Santa Eugènia de Berga', 'province_id' => 2], ['name' => 'Santa Eulàlia de Riuprimer', 'province_id' => 2], ['name' => 'Santa Eulàlia de Ronçana', 'province_id' => 2], ['name' => 'Santa Fe del Penedès', 'province_id' => 2], ['name' => 'Santa Margarida de Montbui', 'province_id' => 2], ['name' => 'Santa Margarida i els Monjos', 'province_id' => 2], ['name' => 'Santa Maria d\'Oló', 'province_id' => 2], ['name' => 'Santa Maria de Besora', 'province_id' => 2], ['name' => 'Santa Maria de Corcó', 'province_id' => 2], ['name' => 'Santa Maria de Martorelles', 'province_id' => 2], ['name' => 'Santa Maria de Merlès', 'province_id' => 2], ['name' => 'Santa Maria de Miralles', 'province_id' => 2], ['name' => 'Santa Maria de Palautordera', 'province_id' => 2], ['name' => 'Santa Perpètua de Mogoda', 'province_id' => 2], ['name' => 'Santa Susanna', 'province_id' => 2], ['name' => 'Santpedor', 'province_id' => 2], ['name' => 'Sentmenat', 'province_id' => 2], ['name' => 'Seva', 'province_id' => 2], ['name' => 'Sitges', 'province_id' => 2], ['name' => 'Sobremunt', 'province_id' => 2], ['name' => 'Sora', 'province_id' => 2], ['name' => 'Subirats', 'province_id' => 2], ['name' => 'Súria', 'province_id' => 2], ['name' => 'Tagamanent', 'province_id' => 2], ['name' => 'Talamanca', 'province_id' => 2], ['name' => 'Taradell', 'province_id' => 2], ['name' => 'Tavèrnoles', 'province_id' => 2], ['name' => 'Tavertet', 'province_id' => 2], ['name' => 'Teià', 'province_id' => 2], ['name' => 'Terrassa', 'province_id' => 2], ['name' => 'Tiana', 'province_id' => 2], ['name' => 'Tona', 'province_id' => 2], ['name' => 'Tordera', 'province_id' => 2], ['name' => 'Torelló', 'province_id' => 2], ['name' => 'Torre de Claramunt', 'province_id' => 2], ['name' => 'Torrelavit', 'province_id' => 2], ['name' => 'Torrelles de Foix', 'province_id' => 2], ['name' => 'Torrelles de Llobregat', 'province_id' => 2], ['name' => 'Ullastrell', 'province_id' => 2], ['name' => 'Vacarisses', 'province_id' => 2], ['name' => 'Vallbona d\'Anoia', 'province_id' => 2], ['name' => 'Vallcebre', 'province_id' => 2], ['name' => 'Vallgorguina', 'province_id' => 2], ['name' => 'Vallirana', 'province_id' => 2], ['name' => 'Vallromanes', 'province_id' => 2], ['name' => 'Veciana', 'province_id' => 2], ['name' => 'Vic', 'province_id' => 2], ['name' => 'Vilada', 'province_id' => 2], ['name' => 'Viladecans', 'province_id' => 2], ['name' => 'Viladecavalls', 'province_id' => 2], ['name' => 'Vilafranca del Penedès', 'province_id' => 2], ['name' => 'Vilalba Sasserra', 'province_id' => 2], ['name' => 'Vilanova de Sau', 'province_id' => 2], ['name' => 'Vilanova del Camí', 'province_id' => 2], ['name' => 'Vilanova del Vallès', 'province_id' => 2], ['name' => 'Vilanova i la Geltrú', 'province_id' => 2], ['name' => 'Vilassar de Dalt', 'province_id' => 2], ['name' => 'Vilassar de Mar', 'province_id' => 2], ['name' => 'Vilobí del Penedès', 'province_id' => 2], ['name' => 'Viver i Serrateix', 'province_id' => 2], ['name' => 'Aiguamúrcia', 'province_id' => 3], ['name' => 'Alcover', 'province_id' => 3], ['name' => 'Alió', 'province_id' => 3], ['name' => 'Bràfim', 'province_id' => 3], ['name' => 'Cabra del Camp', 'province_id' => 3], ['name' => 'Figuerola del Camp', 'province_id' => 3], ['name' => 'Els Garidells', 'province_id' => 3], ['name' => 'La Masó', 'province_id' => 3], ['name' => 'El Milà', 'province_id' => 3], ['name' => 'Montferri', 'province_id' => 3], ['name' => 'Mont-ral', 'province_id' => 3], ['name' => 'Nulles', 'province_id' => 3], ['name' => 'El Pla de Santa Maria', 'province_id' => 3], ['name' => 'El Pont d\'Armentera', 'province_id' => 3], ['name' => 'Puigpelat', 'province_id' => 3], ['name' => 'Querol', 'province_id' => 3], ['name' => 'La Riba', 'province_id' => 3], ['name' => 'Rodonyà', 'province_id' => 3], ['name' => 'El Rourell', 'province_id' => 3], ['name' => 'Vallmoll', 'province_id' => 3], ['name' => 'Valls', 'province_id' => 3], ['name' => 'Vilabella', 'province_id' => 3], ['name' => 'Vila-rodona', 'province_id' => 3], ['name' => 'L\'Albiol', 'province_id' => 3], ['name' => 'L\'Aleixar', 'province_id' => 3], ['name' => 'Alforja', 'province_id' => 3], ['name' => 'Almoster', 'province_id' => 3], ['name' => 'L\'Arbolí', 'province_id' => 3], ['name' => 'L\'Argentera', 'province_id' => 3], ['name' => 'Les Borges del Camp', 'province_id' => 3], ['name' => 'Botarell', 'province_id' => 3], ['name' => 'Cambrils', 'province_id' => 3], ['name' => 'Capafonts', 'province_id' => 3], ['name' => 'Castellvell del Camp', 'province_id' => 3], ['name' => 'Colldejou', 'province_id' => 3], ['name' => 'Duesaigües', 'province_id' => 3], ['name' => 'La Febró', 'province_id' => 3], ['name' => 'Maspujols', 'province_id' => 3], ['name' => 'Montbrió del Camp', 'province_id' => 3], ['name' => 'Mont-roig del Camp', 'province_id' => 3], ['name' => 'Prades', 'province_id' => 3], ['name' => 'Praip', 'province_id' => 3], ['name' => 'Reus', 'province_id' => 3], ['name' => 'Riudecanyes', 'province_id' => 3], ['name' => 'Riudecols', 'province_id' => 3], ['name' => 'Riudoms', 'province_id' => 3], ['name' => 'La Selva del Camp', 'province_id' => 3], ['name' => 'Vandellòs i l\'Hospitalet de l\'Infant', 'province_id' => 3], ['name' => 'Vilanova d\'Escornalbou', 'province_id' => 3], ['name' => 'Vilaplana', 'province_id' => 3], ['name' => 'Vinyols i els Arcs', 'province_id' => 3], ['name' => 'L\'Aldea', 'province_id' => 3], ['name' => 'Aldover', 'province_id' => 3], ['name' => 'Alfara de Carles', 'province_id' => 3], ['name' => 'L\'Ametlla de Mar', 'province_id' => 3], ['name' => 'L\'Ampolla', 'province_id' => 3], ['name' => 'Benifallet', 'province_id' => 3], ['name' => 'Camarles', 'province_id' => 3], ['name' => 'Xerta', 'province_id' => 3], ['name' => 'Deltebre', 'province_id' => 3], ['name' => 'Paüls', 'province_id' => 3], ['name' => 'El Perelló', 'province_id' => 3], ['name' => 'Roquetes', 'province_id' => 3], ['name' => 'Tivenys', 'province_id' => 3], ['name' => 'Tortosa', 'province_id' => 3], ['name' => 'Albinyana', 'province_id' => 3], ['name' => 'L\'Arboç', 'province_id' => 3], ['name' => 'Banyeres del Penedès', 'province_id' => 3], ['name' => 'Bellvei', 'province_id' => 3], ['name' => 'La Bisbal de Falset', 'province_id' => 3], ['name' => 'Calafell', 'province_id' => 3], ['name' => 'Cunit', 'province_id' => 3], ['name' => 'Llorenç del Penedès', 'province_id' => 3], ['name' => 'Masllorenç', 'province_id' => 3], ['name' => 'El Montmell', 'province_id' => 3], ['name' => 'Sant Jaume dels Domenys', 'province_id' => 3], ['name' => 'Santa Oliva', 'province_id' => 3], ['name' => 'El Vendrell', 'province_id' => 3], ['name' => 'Barberà de la Conca', 'province_id' => 3], ['name' => 'Blancafort', 'province_id' => 3], ['name' => 'Conesa', 'province_id' => 3], ['name' => 'L\'Espluga de Francolí', 'province_id' => 3], ['name' => 'Forès', 'province_id' => 3], ['name' => 'Llorac', 'province_id' => 3], ['name' => 'Montblanc', 'province_id' => 3], ['name' => 'Passanant i Belltall', 'province_id' => 3], ['name' => 'Les Piles', 'province_id' => 3], ['name' => 'Pira', 'province_id' => 3], ['name' => 'Pontils', 'province_id' => 3], ['name' => 'Rocafort de Queralt', 'province_id' => 3], ['name' => 'Santa Coloma de Queralt', 'province_id' => 3], ['name' => 'Sarral', 'province_id' => 3], ['name' => 'Savallà del Comtat', 'province_id' => 3], ['name' => 'Senan', 'province_id' => 3], ['name' => 'Solivella', 'province_id' => 3], ['name' => 'Vallclara', 'province_id' => 3], ['name' => 'Vallfogona de Riucorb', 'province_id' => 3], ['name' => 'Vilanova de Prades', 'province_id' => 3], ['name' => 'Vilaverd', 'province_id' => 3], ['name' => 'Vimbodí i Poblet', 'province_id' => 3], ['name' => 'Ascó', 'province_id' => 3], ['name' => 'Benissanet', 'province_id' => 3], ['name' => 'Flix', 'province_id' => 3], ['name' => 'Garcia', 'province_id' => 3], ['name' => 'Ginestar', 'province_id' => 3], ['name' => 'Miravet', 'province_id' => 3], ['name' => 'Móra d\'Ebre', 'province_id' => 3], ['name' => 'Móra la Nova', 'province_id' => 3], ['name' => 'La Palma d\'Ebre', 'province_id' => 3], ['name' => 'Rasquera', 'province_id' => 3], ['name' => 'Riba-roja d\'Ebre', 'province_id' => 3], ['name' => 'Tivissa', 'province_id' => 3], ['name' => 'La Torre de l\'Espanyol', 'province_id' => 3], ['name' => 'Vinebre', 'province_id' => 3], ['name' => 'Alcanar', 'province_id' => 3], ['name' => 'Amposta', 'province_id' => 3], ['name' => 'La Sénia', 'province_id' => 3], ['name' => 'Freginals', 'province_id' => 3], ['name' => 'La Galera', 'province_id' => 3], ['name' => 'Godall', 'province_id' => 3], ['name' => 'Mas de Barberans', 'province_id' => 3], ['name' => 'Masdenverge', 'province_id' => 3], ['name' => 'Sant Carles de la Ràpita', 'province_id' => 3], ['name' => 'Sant Jaume d\'Enveja', 'province_id' => 3], ['name' => 'Santa Bàrbara', 'province_id' => 3], ['name' => 'Ulldecona', 'province_id' => 3], ['name' => 'Bellmunt del Priorat', 'province_id' => 3], ['name' => 'La Bisbal del Penedès', 'province_id' => 3], ['name' => 'Cabacés', 'province_id' => 3], ['name' => 'Capçanes', 'province_id' => 3], ['name' => 'Cornudella de Montsant', 'province_id' => 3], ['name' => 'Falset', 'province_id' => 3], ['name' => 'La Figuera', 'province_id' => 3], ['name' => 'Gratallops', 'province_id' => 3], ['name' => 'Els Guiamets', 'province_id' => 3], ['name' => 'El Lloar', 'province_id' => 3], ['name' => 'Margalef', 'province_id' => 3], ['name' => 'Marçà', 'province_id' => 3], ['name' => 'El Masroig', 'province_id' => 3], ['name' => 'El Molar', 'province_id' => 3], ['name' => 'La Morera de Montsant', 'province_id' => 3], ['name' => 'Poboleda', 'province_id' => 3], ['name' => 'Porrera', 'province_id' => 3], ['name' => 'Pradell de la Teixeta', 'province_id' => 3], ['name' => 'La Torre de Fontaubella', 'province_id' => 3], ['name' => 'Torroja del Priorat', 'province_id' => 3], ['name' => 'Ulldemolins', 'province_id' => 3], ['name' => 'La Vilella Alta', 'province_id' => 3], ['name' => 'La Vilella Baixa', 'province_id' => 3], ['name' => 'Altafulla', 'province_id' => 3], ['name' => 'La Canonja', 'province_id' => 3], ['name' => 'El Catllar', 'province_id' => 3], ['name' => 'Constantí', 'province_id' => 3], ['name' => 'Creixell', 'province_id' => 3], ['name' => 'El Morell', 'province_id' => 3], ['name' => 'La Nou de Gaià', 'province_id' => 3], ['name' => 'Els Pallaresos', 'province_id' => 3], ['name' => 'Perafort', 'province_id' => 3], ['name' => 'La Pobla de Mafumet', 'province_id' => 3], ['name' => 'La Pobla de Montornès', 'province_id' => 3], ['name' => 'Renau', 'province_id' => 3], ['name' => 'La Riera de Gaià', 'province_id' => 3], ['name' => 'Roda de Barà', 'province_id' => 3], ['name' => 'Salomó', 'province_id' => 3], ['name' => 'Salou', 'province_id' => 3], ['name' => 'La Secuita', 'province_id' => 3], ['name' => 'Tarragona', 'province_id' => 3], ['name' => 'Torredembarra', 'province_id' => 3], ['name' => 'Vespella de Gaià', 'province_id' => 3], ['name' => 'Vilallonga del Camp', 'province_id' => 3], ['name' => 'Vila-seca', 'province_id' => 3], ['name' => 'Arnes', 'province_id' => 3], ['name' => 'Batea', 'province_id' => 3], ['name' => 'Bot', 'province_id' => 3], ['name' => 'Caseres', 'province_id' => 3], ['name' => 'Corbera d\'Ebre', 'province_id' => 3], ['name' => 'La Fatarella', 'province_id' => 3], ['name' => 'Gandesa', 'province_id' => 3], ['name' => 'Horta de Sant Joan', 'province_id' => 3], ['name' => 'La Pobla de Massaluca', 'province_id' => 3], ['name' => 'El Pinell de Brai', 'province_id' => 3], ['name' => 'Prat de Comte', 'province_id' => 3], ['name' => 'Vilalba dels Arcs', 'province_id' => 3], ['name' => 'Abella de la Conca', 'province_id' => 4], ['name' => 'Àger', 'province_id' => 4], ['name' => 'Agramunt', 'province_id' => 4], ['name' => 'Aitona', 'province_id' => 4], ['name' => 'Els Alamús', 'province_id' => 4], ['name' => 'Alàs i Cerc', 'province_id' => 4], ['name' => 'L\'Albagés', 'province_id' => 4], ['name' => 'Albatàrrec', 'province_id' => 4], ['name' => 'Albesa', 'province_id' => 4], ['name' => 'L\'Albi', 'province_id' => 4], ['name' => 'Alcanó', 'province_id' => 4], ['name' => 'Alcarràs', 'province_id' => 4], ['name' => 'Alcoletge', 'province_id' => 4], ['name' => 'Alfarràs', 'province_id' => 4], ['name' => 'Alfés', 'province_id' => 4], ['name' => 'Algerri', 'province_id' => 4], ['name' => 'Alguaire', 'province_id' => 4], ['name' => 'Alins', 'province_id' => 4], ['name' => 'Almacelles', 'province_id' => 4], ['name' => 'Almatret', 'province_id' => 4], ['name' => 'Almenar', 'province_id' => 4], ['name' => 'Alòs de Balaguer', 'province_id' => 4], ['name' => 'Alpicat', 'province_id' => 4], ['name' => 'Alt Àneu', 'province_id' => 4], ['name' => 'Naut Aran', 'province_id' => 4], ['name' => 'Anglesola', 'province_id' => 4], ['name' => 'Arbeca', 'province_id' => 4], ['name' => 'Arres', 'province_id' => 4], ['name' => 'Arsèguell', 'province_id' => 4], ['name' => 'Artesa de Lleida', 'province_id' => 4], ['name' => 'Artesa de Segre', 'province_id' => 4], ['name' => 'La Sentiu de Sió', 'province_id' => 4], ['name' => 'Aspa', 'province_id' => 4], ['name' => 'Les Avellanes i Santa Linya', 'province_id' => 4], ['name' => 'Baix Pallars', 'province_id' => 4], ['name' => 'Balaguer', 'province_id' => 4], ['name' => 'Barbens', 'province_id' => 4], ['name' => 'La Baronia de Rialb', 'province_id' => 4], ['name' => 'Bassella', 'province_id' => 4], ['name' => 'Bausen', 'province_id' => 4], ['name' => 'Belianes', 'province_id' => 4], ['name' => 'Bell-lloc d\'Urgell', 'province_id' => 4], ['name' => 'Bellaguarda', 'province_id' => 4], ['name' => 'Bellcaire d\'Urgell', 'province_id' => 4], ['name' => 'Bellmunt d\'Urgell', 'province_id' => 4], ['name' => 'Bellpuig', 'province_id' => 4], ['name' => 'Bellver de Cerdanya', 'province_id' => 4], ['name' => 'Bellvís', 'province_id' => 4], ['name' => 'Benavent de Segrià', 'province_id' => 4], ['name' => 'Biosca', 'province_id' => 4], ['name' => 'Bovera', 'province_id' => 4], ['name' => 'Es Bòrdes', 'province_id' => 4], ['name' => 'Les Borges Blanques', 'province_id' => 4], ['name' => 'Bossòst', 'province_id' => 4], ['name' => 'Cabanabona', 'province_id' => 4], ['name' => 'Cabó', 'province_id' => 4], ['name' => 'Camarasa', 'province_id' => 4], ['name' => 'Canejan', 'province_id' => 4], ['name' => 'Castell de Mur', 'province_id' => 4], ['name' => 'Castellar de la Ribera', 'province_id' => 4], ['name' => 'Castelldans', 'province_id' => 4], ['name' => 'Castellnou de Seana', 'province_id' => 4], ['name' => 'Castelló de Farfanya', 'province_id' => 4], ['name' => 'Castellserà', 'province_id' => 4], ['name' => 'Cava', 'province_id' => 4], ['name' => 'Cervera', 'province_id' => 4], ['name' => 'Cervià de les Garrigues', 'province_id' => 4], ['name' => 'Ciutadilla', 'province_id' => 4], ['name' => 'Clariana de Cardener', 'province_id' => 4], ['name' => 'El Cogul', 'province_id' => 4], ['name' => 'Coll de Nargó', 'province_id' => 4], ['name' => 'Conca de Dalt', 'province_id' => 4], ['name' => 'Corbins', 'province_id' => 4], ['name' => 'Cubells', 'province_id' => 4], ['name' => 'L\'Espluga Calba', 'province_id' => 4], ['name' => 'Espot', 'province_id' => 4], ['name' => 'Estamariu', 'province_id' => 4], ['name' => 'Estaràs', 'province_id' => 4], ['name' => 'Esterri d\'Àneu', 'province_id' => 4], ['name' => 'Esterri de Cardós', 'province_id' => 4], ['name' => 'Farrera', 'province_id' => 4], ['name' => 'Fígols i Alinyà', 'province_id' => 4], ['name' => 'La Floresta', 'province_id' => 4], ['name' => 'Fondarella', 'province_id' => 4], ['name' => 'Foradada', 'province_id' => 4], ['name' => 'La Fuliola', 'province_id' => 4], ['name' => 'Fulleda', 'province_id' => 4], ['name' => 'Gavet de la Conca', 'province_id' => 4], ['name' => 'Gimenells i el Pla de la Font', 'province_id' => 4], ['name' => 'Golmés', 'province_id' => 4], ['name' => 'Gósol', 'province_id' => 4], ['name' => 'La Granadella', 'province_id' => 4], ['name' => 'La Granja d\'Escarp', 'province_id' => 4], ['name' => 'Granyanella', 'province_id' => 4], ['name' => 'Granyena de les Garrigues', 'province_id' => 4], ['name' => 'Granyena de Segarra', 'province_id' => 4], ['name' => 'Guimerà', 'province_id' => 4], ['name' => 'La Guingueta d\'Àneu', 'province_id' => 4], ['name' => 'Guissona', 'province_id' => 4], ['name' => 'Guixers', 'province_id' => 4], ['name' => 'Ivars de Noguera', 'province_id' => 4], ['name' => 'Ivars d\'Urgell', 'province_id' => 4], ['name' => 'Ivorra', 'province_id' => 4], ['name' => 'Isona i Conca Dellà', 'province_id' => 4], ['name' => 'Josa i Tuixén', 'province_id' => 4], ['name' => 'Juncosa', 'province_id' => 4], ['name' => 'Juneda', 'province_id' => 4], ['name' => 'Lleida', 'province_id' => 4], ['name' => 'Les', 'province_id' => 4], ['name' => 'Linyola', 'province_id' => 4], ['name' => 'Lladorre', 'province_id' => 4], ['name' => 'Lladurs', 'province_id' => 4], ['name' => 'Llardecans', 'province_id' => 4], ['name' => 'Llavorsí', 'province_id' => 4], ['name' => 'Lles de Cerdanya', 'province_id' => 4], ['name' => 'Llimiana', 'province_id' => 4], ['name' => 'Llobera', 'province_id' => 4], ['name' => 'Maldà', 'province_id' => 4], ['name' => 'Massalcoreig', 'province_id' => 4], ['name' => 'Massoteres', 'province_id' => 4], ['name' => 'Maials', 'province_id' => 4], ['name' => 'Menàrguens', 'province_id' => 4], ['name' => 'Miralcamp', 'province_id' => 4], ['name' => 'Mollerussa', 'province_id' => 4], ['name' => 'La Molsosa', 'province_id' => 4], ['name' => 'Montgai', 'province_id' => 4], ['name' => 'Montellà i Martinet', 'province_id' => 4], ['name' => 'Montferrer i Castellbò', 'province_id' => 4], ['name' => 'Montoliu de Lleida', 'province_id' => 4], ['name' => 'Montoliu de Segarra', 'province_id' => 4], ['name' => 'Montornès de Segarra', 'province_id' => 4], ['name' => 'Nalec', 'province_id' => 4], ['name' => 'Navès', 'province_id' => 4], ['name' => 'Odèn', 'province_id' => 4], ['name' => 'Oliana', 'province_id' => 4], ['name' => 'Oliola', 'province_id' => 4], ['name' => 'Olius', 'province_id' => 4], ['name' => 'Les Oluges', 'province_id' => 4], ['name' => 'Els Omellons', 'province_id' => 4], ['name' => 'Els Omells de na Gaia', 'province_id' => 4], ['name' => 'Organyà', 'province_id' => 4], ['name' => 'Os de Balaguer', 'province_id' => 4], ['name' => 'Ossó de Sió', 'province_id' => 4], ['name' => 'El Palau d\'Anglesola', 'province_id' => 4], ['name' => 'La Coma i la Pedra', 'province_id' => 4], ['name' => 'Penelles', 'province_id' => 4], ['name' => 'Peramola', 'province_id' => 4], ['name' => 'Pinell de Solsonès', 'province_id' => 4], ['name' => 'Pinós', 'province_id' => 4], ['name' => 'Els Plans de Sió', 'province_id' => 4], ['name' => 'El Poal', 'province_id' => 4], ['name' => 'La Pobla de Cérvoles', 'province_id' => 4], ['name' => 'La Pobla de Segur', 'province_id' => 4], ['name' => 'El Pont de Bar', 'province_id' => 4], ['name' => 'El Pont de Suert', 'province_id' => 4], ['name' => 'Ponts', 'province_id' => 4], ['name' => 'La Portella', 'province_id' => 4], ['name' => 'Prats i Sansor', 'province_id' => 4], ['name' => 'Preixana', 'province_id' => 4], ['name' => 'Preixens', 'province_id' => 4], ['name' => 'Prullans', 'province_id' => 4], ['name' => 'Puiggròs', 'province_id' => 4], ['name' => 'Puigverd d\'Agramunt', 'province_id' => 4], ['name' => 'Puigverd de Lleida', 'province_id' => 4], ['name' => 'Rialp', 'province_id' => 4], ['name' => 'Ribera d\'Ondara', 'province_id' => 4], ['name' => 'Ribera d\'Urgellet', 'province_id' => 4], ['name' => 'Riner', 'province_id' => 4], ['name' => 'Riu de Cerdanya', 'province_id' => 4], ['name' => 'Rosselló', 'province_id' => 4], ['name' => 'Salàs de Pallars', 'province_id' => 4], ['name' => 'Sant Esteve de la Sarga', 'province_id' => 4], ['name' => 'Sant Guim de Freixenet', 'province_id' => 4], ['name' => 'Sant Guim de la Plana', 'province_id' => 4], ['name' => 'Sant Llorenç de Morunys', 'province_id' => 4], ['name' => 'Sant Martí de Riucorb', 'province_id' => 4], ['name' => 'Sant Ramon', 'province_id' => 4], ['name' => 'Sanaüja', 'province_id' => 4], ['name' => 'Sarroca de Bellera', 'province_id' => 4], ['name' => 'Sarroca de Lleida', 'province_id' => 4], ['name' => 'Senterada', 'province_id' => 4], ['name' => 'La Seu d\'Urgell', 'province_id' => 4], ['name' => 'Serós', 'province_id' => 4], ['name' => 'Sidamon', 'province_id' => 4], ['name' => 'El Soleràs', 'province_id' => 4], ['name' => 'Solsona', 'province_id' => 4], ['name' => 'Soriguera', 'province_id' => 4], ['name' => 'Sort', 'province_id' => 4], ['name' => 'Soses', 'province_id' => 4], ['name' => 'Sudanell', 'province_id' => 4], ['name' => 'Sunyer', 'province_id' => 4], ['name' => 'Talarn', 'province_id' => 4], ['name' => 'Talavera', 'province_id' => 4], ['name' => 'Tàrrega', 'province_id' => 4], ['name' => 'Tarrés', 'province_id' => 4], ['name' => 'Tarroja de Segarra', 'province_id' => 4], ['name' => 'Térmens', 'province_id' => 4], ['name' => 'Tírvia', 'province_id' => 4], ['name' => 'Tiurana', 'province_id' => 4], ['name' => 'Torà', 'province_id' => 4], ['name' => 'Els Torms', 'province_id' => 4], ['name' => 'Tornabous', 'province_id' => 4], ['name' => 'La Torre de Cabdella', 'province_id' => 4], ['name' => 'Torrebesses', 'province_id' => 4], ['name' => 'Torrefarrera', 'province_id' => 4], ['name' => 'Torrefeta i Florejacs', 'province_id' => 4], ['name' => 'Torregrossa', 'province_id' => 4], ['name' => 'Torrelameu', 'province_id' => 4], ['name' => 'Torres de Segre', 'province_id' => 4], ['name' => 'Torreserona', 'province_id' => 4], ['name' => 'Tremp', 'province_id' => 4], ['name' => 'La Vall de Boí', 'province_id' => 4], ['name' => 'Vall de Cardós', 'province_id' => 4], ['name' => 'Vallbona de les Monges', 'province_id' => 4], ['name' => 'Vallfogona de Balaguer', 'province_id' => 4], ['name' => 'Les Valls d\'Aguilar', 'province_id' => 4], ['name' => 'Les Valls de Valira', 'province_id' => 4], ['name' => 'La Vansa i Fórnols', 'province_id' => 4], ['name' => 'Verdú', 'province_id' => 4], ['name' => 'Vielha e Mijaran', 'province_id' => 4], ['name' => 'Vilagrassa', 'province_id' => 4], ['name' => 'Vilaller', 'province_id' => 4], ['name' => 'Vilamòs', 'province_id' => 4], ['name' => 'Vilanova de Bellpuig', 'province_id' => 4], ['name' => 'Vilanova de l\'Aguda', 'province_id' => 4], ['name' => 'Vilanova de Meià', 'province_id' => 4], ['name' => 'Vilanova de Segrià', 'province_id' => 4], ['name' => 'Vila-sana', 'province_id' => 4], ['name' => 'Vilanova de la Barca', 'province_id' => 4], ['name' => 'El Vilosell', 'province_id' => 4], ['name' => 'Vinaixa', 'province_id' => 4]);
     $roles = array(['id' => 1, 'type' => 'Member'], ['id' => 2, 'type' => 'Owner'], ['id' => 3, 'type' => 'Admin']);
     $prices = array(['id' => 1, 'interval' => '0-10'], ['id' => 2, 'interval' => '10-15'], ['id' => 3, 'interval' => '15-20'], ['id' => 4, 'interval' => '20-25'], ['id' => 5, 'interval' => '25-30'], ['id' => 6, 'interval' => '30-35'], ['id' => 7, 'interval' => '35-40'], ['id' => 8, 'interval' => '40-45'], ['id' => 9, 'interval' => '45-50'], ['id' => 10, 'interval' => '50 o més']);
     $users = array(['first_name' => 'Francesc', 'last_name' => 'Armengol', 'email' => '*****@*****.**', 'password' => Hash::make('esmorzarsibenzina'), 'role_id' => 3], ['first_name' => 'Silvia', 'last_name' => 'Lopez', 'email' => '*****@*****.**', 'password' => Hash::make('silvia'), 'role_id' => 1], ['first_name' => 'Arnau', 'last_name' => 'Monclus', 'email' => '*****@*****.**', 'password' => Hash::make('naui'), 'role_id' => 2], ['first_name' => 'Pollify', 'last_name' => 'Polles', 'email' => '*****@*****.**', 'password' => Hash::make('pollify'), 'role_id' => 1]);
     $restaurants = array(["id" => 1, "name" => 'Can Gabatxó', "description" => 'Sense descripció', "address" => 'Carretera Comarcal Santa Coloma De Farners, Km 3.5 17430 Santa Coloma de Farners, Girona', "latitude" => 41.89097, "longitude" => 2.656619, "phone" => 973624322, "img_url_1" => "image1.jpg", "website" => "null", "facebook_page" => "https://www.facebook.com/pages/Can-Cabatxo/180512255389310", "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 2, "name" => 'Can Quel', "description" => 'El Restaurant Can Quel de Foixà, situat al nord-oest del Baix Empordà, és un establiment de cuina típica catalana i empordanesa. Disposa de tres sales i una terrassa. És un restaurant centenari, ja que actualment som a la quarta generació.', "address" => 'Carrer Les Escoles, 3, 17132 Foixà, Girona', "latitude" => 42.039221, "longitude" => 2.998355, "phone" => 972769064, "img_url_1" => "image1.jpg", "website" => 'http://www.canquel.cat', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 3, "name" => 'Hotel Restaurant Les Roques', "description" => 'Som un establiment de caire familiar, gestionat actualment per la 3ª generació dels qui a principis dels 80 començaren amb un petit Restaurant. La nostre familia va iniciar un negoci de restauració per dinamitzar una nova urbanització que es contruïa al poble de Calabuig, aquí es posaren els fonaments del que actualment és el nostre Hotel-Restaurant. Al principi era un Bar Restaurant, on a part hi teniem la vivenda, l´any 2010 es realitza un altre pas, i es passa a reformar la nostra vivenda i a convertir-lo en l\'Hotel-Restaurant que actualment regentem. Després d´aquests anys continuem amb la mateixa línia d\'intentar donar un tracte agradable i familiar als nostres clients i amics.', "address" => 'Av. Empordà, 27, 17483 Les Roques, Bàscara, Girona', "latitude" => 42.1495, "longitude" => 2.928822, "phone" => 972560251, "img_url_1" => "image1.jpg", "website" => 'http://www.hotellesroques.com', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 4, "name" => 'Restaurant l\'avi Pep', "description" => 'Disposem del millor pernil de la comarca autèntic ibèric 5j, assortits d\'autèntic embotits Iberico, varietat de torrades, tapes des de la mes tradicional al més modern en gastronomia ...Menú casolà de dilluns a divendres amb nou primers i nou segons a escollir. Menú especial de cap de setmana amb mariscades i carns a la brasa. Servei de càtering. Menús especials per a grups i empreses', "address" => 'Av. Saus, s/n 17465 Camallera Girona', "latitude" => 42.126017, "longitude" => 2.967631, "phone" => 972795849, "img_url_1" => "image1.jpg", "website" => 'http://restaurantlavipep.es/', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 5, "name" => 'Bar restaurant Can Quer', "description" => 'Sense descripció', "address" => 'C/ Carretera de Santa Coloma a Olot, km 3, 17166 El pasteral, Girona', "latitude" => 41.983109, "longitude" => 2.606517, "phone" => 972421715, "img_url_1" => "image1.jpg", "website" => 'http://www.canquer.com', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 6, "name" => 'Restaurant Can Panedes', "description" => 'A Can Panedes oferim des de 1966 la millor cuina tradicional catalana. A pocs quilòmetres de la Costa Brava i als contraforts de les Gavarres, podem i volem oferir-vos una experiència gastronòmica. Tant si esteu de pas com si heu decidit visitar-nos, no us en penedireu. Podreu degustar els nostres esmorzars de forquilla, la nostra carta, el menú diari o el de cap de setmana, tot regat amb els millors vins de pagès...', "address" => 'Carretera C-65 km 12, 17240, Llagostera', "latitude" => 41.830672, "longitude" => 2.920206, "phone" => 972830356, "img_url_1" => "image1.jpg", "website" => 'http://www.canpanedes.com/', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 7, "name" => 'Hostal La Muntanya', "description" => 'Castellar de n\'Hug va ser fins la dècada dels seixanta del segle passat un poble que tenia una economia basada en l\'agricultura i la ramaderia de subsistència. Concretament la nostra família, com la majoria de la població, tenia alguns animals i conreava les terres familiars. A més, en l\'actual ubicació de l\'hostal, hi havia la ferreria, ja que tots els avantpassats hereus de la casa des de fa més de dos segles eren els ferrers del poble. A mitjan segle vint hi va haver una forta emigració del camp a les ciutats i la vida als pobles encara va ser més difícil. Però amb l\'aparició del mític SEAT 600 es va obrir una nova possibilitat a petits pobles com va ser el cas de Castellar de n\'Hug, el turisme. Emprenedors, l\'Isidre, el Ferrer, i la Cecília, mestressa de casa i cuinera excel·lent, van començar a donar menjars i fer una mica de fonda, ja que hi havia un excés de demanda. I va ser llavors, ara ja fa més de quaranta anys que va néixer l\'Hostal la Muntanya. Actualment, la Sisqueta (la filla de l’Isidre i la Cecília) regenta l’Hostal, ja amb l’ajuda del seu fill Ferran i la seva parella, i l\'alegria del seu nét Jaume.', "address" => 'Plaça Major, 4, Castellar de n\'Hug, España', "latitude" => 42.2824661, "longitude" => 2.017449, "phone" => 938257065, "img_url_1" => "image1.jpg", "website" => 'http://www.hostallamuntanya.cat', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 8, "name" => 'Restaurant la Torre', "description" => 'El nostre Restaurant ofereix un ambient agradable i la possibilitat de gaudir de la millor cuina tradicional casolana, que junt amb l´acurat servei i l´originalitat dels nostres plats elaborats amb els millors productes de la terra, farà les delícies dels paladars més exigents i sorprendrà els més curiosos. És en resum una cuina plena de gustos i sensacions, de la que us recomanem entre d´altres la Nostra Especialitat la Carn a la Brasa, els Cargols a la Llauna (per encàrrec), l\'Ànec Rostit, els Guisats, etc.', "address" => 'Carrer Girona s/n. 17851 Maià de Montcal Girona', "latitude" => 42.220087, "longitude" => 2.74553, "phone" => 972599285, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "img_url_3" => "image3.jpg", "img_url_4" => "image4.jpg", "img_url_5" => "image5.jpg", "website" => 'http://www.restaurantlatorre.com', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 9, "name" => 'Restaurant Can Reixac', "description" => 'Sense descripció', "address" => 'Sant Martí de Llémena, España', "latitude" => 42.0363141, "longitude" => 2.6471572, "phone" => 972443035, "website" => null, "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "user_id" => 1, "price_id" => 2], ["id" => 10, "name" => 'Restaurant bar Can Selvatà', "description" => 'Un esmorzar de somnis. A partir de les sis del matí, disposem d\'una brasa equipada amb tot el necessari ... pa, tomàquet, plats de carn,... on cada un es pot preparar el seu esmorzar al seu gust. Tot un èxit. Més informació', "address" => 'Carretera Girona Banyoles, Km 14,8', "latitude" => 42.0169692, "longitude" => 2.9280324, "phone" => 972594080, "img_url_1" => "image1.jpg", "website" => 'http://www.canselvata.cat', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 11, "name" => 'Hostal de Rama', "description" => 'L’Hostal de Rama forma part de les masies del veïnat de Rama. Situat a la vora de l’antic camí que unia Ripoll amb Sant Joan de les Abadesses, en èpoques d’anar a peu, encara compta amb el conjunt d’edificacions que l’abastien, tals com la cabanya, un antic forn de pa i la quadra, totes elles situades al voltant de l’era de la masia. Actualment, la casa principal que ocupava l’antic Hostal de Rama, alberga el Restaurant de Rama, oferint als nostres clients un servei de bar-restaurant on la cuina tradicional és la protagonista, en un entorn típic de les masies de pagès catalanes.', "address" => 'N-260, Km 112', "latitude" => 42.219969, "longitude" => 2.228905, "phone" => 972703802, "img_url_1" => "image1.jpg", "website" => 'http://www.elripolles.com/hostalderama', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "user_id" => 1, "price_id" => 2], ["id" => 12, "name" => 'Restaurant Can Valls', "description" => 'Can Valls es va fundar l’any 1950. És un restaurant amb tradició familiar que integra , en una mateixa carta, la cuina tradicional catalana i la cuina mediterrània amb tocs innovadors que proposa el xef i propietari, David Valls.', "address" => 'Carrer Escoles, 1 Sant Marti Sapresa', "latitude" => 41.919426, "longitude" => 2.653525, "phone" => 972420913, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => 'http://www.restaurantcanvalls.com', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 13, "name" => 'Restaurant Mas la Coma', "description" => 'Sense descripció', "address" => 'Carretera Campdevanol, 0 S/N 17531 Gombrèn, Girona', "latitude" => 42.24827, "longitude" => 2.09211, "phone" => 972730610, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => null, "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 14, "name" => 'Bar restaurant El Collet', "description" => 'Sense descripció', "address" => 'Barri Hostalnou, s/n 17854 St. Jaume de Llierca, Girona', "latitude" => 42.230001, "longitude" => 2.590778, "phone" => 972687709, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "img_url_3" => "image3.jpg", "img_url_4" => "image4.jpg", "website" => 'http://www.restaurantelcollet.com', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 15, "name" => 'Restaurant Can Rajolet', "description" => 'Restaurant	a Girona, al poble de Vilanna (Bescanó)	us oferim esmorzars de forquilla, menú diari i festiu, sopars per a colles, serveis especials per a cicloturistes i altres col·lectius. El restaurant disposa de dos menjadors, bar, terrassa, pàrquing per tot tipus de vehicles, una "BIKE AREA ", WIFI i, a més, som punt burricleta.', "address" => 'Crta. Girona-Anglès s/n N-141, 17162 Bescanó', "latitude" => 41.969637, "longitude" => 2.673025, "phone" => 972423291, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => 'http://www.canrajolet.cat', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 16, "name" => 'Hotel Restaurant Fonda Rigà', "description" => 'Inaugurat l\'any 1971 per l\'Albert Rigat i la Dolors Gardella. De mica en mica, i amb la inestimable ajuda de l\'àvia Conxita, l\'avi Josep i més tard els sis fills, ha anat creixent i modernitzant les seves instal.lacions, amb l\'intenció d\'oferir-vos una estada agradable en un ambient tranquil i familiar, amb la màxima professionalitat.', "address" => 'Final de la carretera de Tregurà 17869 Tregurà de Dalt, Girona', "latitude" => 42.343186, "longitude" => 2.287464, "phone" => 972136000, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => 'http://www.fondariga.com', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 17, "name" => 'Bar Restaurant El Roura Blanch', "description" => 'El restaurant es dedica a la cuina mediterrània tradicional i a la braseria. Els seus plats es caracteritzen per ser senzills, ben cuinats i preparats amb molta dedicació. El Roura Blanch disposa de diversos espais amb encant on els clients poden fer l’àpat: el menjador interior, decorat de manera rústica, té una agradable música de fons i és el lloc ideal per a gaudir tranquil·lament del menjar; així mateix, si es prefereix estar a l’aire lliure hi ha la possibilitat de situar-se tant a la plaça mateix com a sota l’arcada que n’envolta una part i que fa d’ombra, la qual cosa no evita que passi una suau brisa que manté tothom ben fresc i a gust durant tota l’estona. Val a dir que el servei del restaurant és molt amable i atén amb un tracte familiar i proper del qual tothom està molt content; així mateix la relació qualitat preu és molt bona i el cafè que serveixen, excel·lent.', "address" => 'Plaça de Jaume I, 3, Monells, Girona, España', "latitude" => 41.9754009, "longitude" => 2.9988681, "phone" => 972630779, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "img_url_3" => "image3.jpg", "img_url_4" => "image4.jpg", "img_url_5" => "image5.jpg", "website" => null, "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 18, "name" => 'Restaurant Fonda Can Costas', "description" => 'En el Restaurant Fonda Can Costas comptem amb àmplia experiència en el sector. La nostra trajectòria, sumada a l\'atenció personalitzada que oferim, és el nostre millor aval. L\'esperem! El restaurant té dos menjadors: un amb capacitat per a 100 persones aproximadament i aire condicionat, i un altre amb capacitat per a 350 persones. Visiteu-nos aviat.', "address" => 'Avinguda de les Mines, 20, Ogassa, España', "latitude" => 42.26596, "longitude" => 2.27745, "phone" => 972720293, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => "www.restaurantcancostas.com", "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 19, "name" => 'Restaurant Montserrat Can Marcelino', "description" => 'Restaurant casolà situat al poble rural de Beuda, on tronaràs la típica cuina de cassola de l\'àvia. Més de 20 anys darrere els fogons. Vine a descobrir el bonic poble de Beuda i gaudeix del seu Romànic al peu del Santuari de Mare de Déu del Mont.', "address" => 'Plaça Major, 5 Beuda, Girona', "latitude" => 42.23696, "longitude" => 2.7095, "phone" => 972590712, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => null, "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 20, "name" => 'Bar Restaurant Mont-Roc', "description" => 'Sense descripció', "address" => 'Carretera Olot-Girona, s/n Castellfollit de la Roca, Girona', "latitude" => 42.22166, "longitude" => 2.552014, "phone" => 972294106, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => null, "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 1], ["id" => 21, "name" => 'Ca l\'Adela', "description" => 'Sense descripció', "address" => 'Carretera de Camprodon, 2, Lloc-Alou', "latitude" => 42.2111403, "longitude" => 2.4546625, "phone" => 972290275, "img_url_1" => "image1.jpg", "website" => 'http://www.caladela.cat', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 22, "name" => 'La Sala', "description" => 'Sense descripció', "address" => 'Plaça del Poble 1, Canet d\'Adri, Girona', "latitude" => 42.0372529, "longitude" => 2.7343198, "phone" => 972428284, "img_url_1" => "image1.jpg", "website" => 'http://www.rlasala.es.tl', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 23, "name" => 'Hotel Restaurant El Serrat', "description" => 'Cuina tradicional catalana, amb carn de criança pròpia i elaboració d\'embotits del porc. No hi ha carta, Rosa et canta el que té: el pica pica de la casa, cargols ..., i després carns, guisats ... mmmm .... Vinga hártate, que val la pena!', "address" => 'Carratera de  Tregurà, s/n Vilallonga de Ter, Girona', "latitude" => 42.34304, "longitude" => 2.28493, "phone" => 972136019, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "website" => 'http://www.hotelserrat.com', "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2], ["id" => 24, "name" => 'Bar Restaurant Anna', "description" => 'Sense descripció', "address" => 'Veinat Ventola, s/n 17534 Solar-Ventola, Girona', "latitude" => 42.31771, "longitude" => 2.13597, "phone" => 972727260, "img_url_1" => "image1.jpg", "img_url_2" => "image2.jpg", "img_url_3" => "image3.jpg", "website" => null, "facebook_page" => null, "twitter_account" => null, "instagram_account" => null, "email" => null, "user_id" => 1, "price_id" => 2]);
     $specialities = array(['name' => 'Peus de porc'], ['name' => 'Carn a la brasa'], ['name' => 'Canelons casolans'], ['name' => 'Cargols'], ['name' => 'Arròs caldós'], ['name' => 'Arròs negre'], ['name' => 'Ànec a la cassola'], ['name' => 'Magret d\'ànec'], ['name' => 'Ànec amb peres'], ['name' => 'Galtes de porc'], ['name' => 'Galtes de vedella'], ['name' => 'Embotits variats'], ['name' => 'Callos'], ['name' => 'Vedella amb bolets'], ['name' => 'Bacallà amb samfaina'], ['name' => 'Bacallà a la catalana'], ['name' => 'Espatlla de xai'], ['name' => 'Capipota'], ['name' => 'Cua de bou'], ['name' => 'Escudella'], ['name' => 'Botifarra amb mongetes'], ['name' => 'Botifarra de perol'], ['name' => 'Botifarra de ceps'], ['name' => 'Carn de perol']);
     foreach ($provinces as $province) {
         Province::create($province);
     }
     foreach ($cities as $city) {
         City::create($city);
     }
     foreach ($roles as $role) {
         Role::create($role);
     }
     foreach ($prices as $price) {
         Price::create($price);
     }
     foreach ($users as $user) {
         User::create($user);
     }
     foreach ($restaurants as $restaurant) {
         Restaurant::create($restaurant);
     }
     foreach ($specialities as $speciality) {
         Speciality::create($speciality);
     }
     Model::reguard();
 }
 /**
  * Display a listing of the restaurants.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return Restaurant::with('ratings')->get();
 }
Exemple #12
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Request $request)
 {
     $restaurant = Restaurant::find($request->input('id_restaurant'));
     $restaurant->delete();
     return "Restaurant record successfully deleted #" . $request->input('id');
 }
Exemple #13
0
 public function restaurant()
 {
     return \App\Restaurant::join('organizations_restaurants', 'restaurants.id', '=', 'organizations_restaurants.restaurant_id')->join('organization_orders', 'organization_orders.organization_restaurant_id', '=', 'organizations_restaurants.id')->where('organization_orders.id', '=', $this->id)->select('restaurants.*')->first();
 }
 /**
  * Get restaurants group by 10
  *
  * @return Response
  */
 public function paginated()
 {
     $restaurants = Restaurant::paginate(10);
     return response()->json(["msg" => "Success", "restaurants" => $restaurants->toArray()], 200);
 }
 public function create(Request $request)
 {
     $restaurants = Restaurant::orderBy('name')->get();
     return view('userOrders.form', ['restaurants' => $restaurants, 'user_order' => new \App\UserOrder()]);
 }
Exemple #16
0
 function updateRestaurant(Request $request)
 {
     $current_user = Session::get('user');
     if (isset($current_user)) {
         $isOwner = Item::where('user_id', $current_user[5])->where('item_id', $request->item_id)->exists();
         if ($current_user[4] == "Admin" || $isOwner) {
             $item = Item::where('item_id', $request->item_id);
             $restaurant = Restaurant::where('link_item_id', $request->item_id);
             $location = Location::where('link_item_id', $request->item_id);
             $photo = new PhotoGallery();
             /*---------------------upload_picture-----------------------*/
             $file = Input::file('profile_picture');
             if ($file != null) {
                 $destinationPath = 'img/';
                 $filename = md5(microtime() . $file->getClientOriginalName()) . "." . $file->getClientOriginalExtension();
                 Input::file('profile_picture')->move($destinationPath, $filename);
                 $num_photo = DB::table('photo_gallery')->count();
                 $photo->photo_id = DB::table('photo_gallery')->skip($num_photo - 1)->first()->photo_id + 1;
                 $photo->link_item_id = $request->item_id;
                 $photo->photo_url = '/' . $destinationPath . $filename;
                 $item->title_picture = $photo->photo_url;
                 $photo->save();
             }
             /*---------------------------------------------------------*/
             $item->title = $request->in_new_title;
             $item->description = $request->in_new_description;
             $item->tel = $request->in_new_tel;
             $item->user_id = $current_user[5];
             if ($current_user[4] == 'Admin') {
                 $item->isApproved = 1;
             } else {
                 $item->isApproved = 0;
             }
             $restaurant->price_range = $request->in_new_price_range;
             $restaurant->food_type = $request->in_new_food_type;
             $restaurant->oc_time = $request->in_new_oc_time;
             $restaurant->credit_card = $request->in_new_credit_card;
             $restaurant->child_appropriate = $request->in_new_child_appropriate;
             $restaurant->reservable = $request->in_new_reservable;
             $restaurant->parking = $request->in_new_parking;
             $location->hint = $request->in_new_hint;
             $location->build = $request->in_new_build;
             $location->street_address = $request->in_new_street_address;
             $location->sub_district = $request->in_new_sub_dis;
             $location->district = $request->in_new_district;
             $location->province = $request->in_new_province;
             $location->postal_code = $request->in_new_post_code;
             $location->lat = $request->in_new_lat;
             $location->long = $request->in_new_lng;
             $item->update(['title' => $item->title, 'description' => $item->description, 'tel' => $item->tel, 'isApproved' => $item->isApproved, 'title_picture' => $item->title_picture]);
             $location->update(['hint' => $location->hint, 'build' => $location->build, 'street_address' => $location->street_address, 'sub_district' => $location->sub_district, 'district' => $location->district, 'province' => $location->province, 'postal_code' => $location->postal_code, 'lat' => $location->lat, 'long' => $location->long]);
             $restaurant->update(['price_range' => $request->in_new_price_range, 'food_type' => $request->in_new_food_type, 'oc_time' => $request->in_new_oc_time, 'credit_card' => $request->in_new_credit_card, 'child_appropriate' => $request->in_new_child_appropriate, 'reservable' => $request->in_new_reservable, 'parking' => $request->in_new_parking]);
             return redirect('/page_restaurant/info/' . $request->item_id);
         }
     }
     return 'fail to authorize permission.';
 }