Skip to content

Commit b3abeba

Browse files
mockupseeding
1 parent cbd2fe6 commit b3abeba

File tree

11 files changed

+378
-10
lines changed

11 files changed

+378
-10
lines changed

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
|
8484
*/
8585

86-
'locale' => 'en',
86+
'locale' => 'it',
8787

8888
/*
8989
|--------------------------------------------------------------------------

database/seeders/ApartmentsTableSeeder.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
use Faker\Generator as Faker;
88
use Illuminate\Support\Facades\Http;
99

10+
use function PHPSTORM_META\map;
11+
1012
class ApartmentsTableSeeder extends Seeder
1113
{
1214
public function run(Faker $faker): void
@@ -61,6 +63,52 @@ public function run(Faker $faker): void
6163
"https://images.pexels.com/photos/271800/pexels-photo-271800.jpeg"
6264
];
6365

66+
$firstApartmentCoverImage = "https://a0.muscache.com/im/pictures/c89164d3-b5a3-46d5-b355-62238c241170.jpg?im_w=1200&im_format=avif";
67+
68+
// genrate 2 presetted apartments
69+
$apartment = [
70+
'user_id' => 1,
71+
'title' => "Regina Di Laglio - Parcheggio gratuito, Giardino, Vista lago",
72+
'rooms' => 2,
73+
'beds' => 2,
74+
'bathrooms' => 2,
75+
'square_meters' => 100,
76+
'description' => "Regina di Laglio è un accogliente e incantevole appartamento con una camera da letto con splendida vista lago sul lago di Como. A pochi passi da di George Clooney. Goditi la comodità di un parcheggio coperto gratuito e di un bel giardino privato. Svegliati con una colazione gratuita servita nella famosa caffetteria e concediti cibo locale nei ristoranti locali nelle vicinanze. Molto vicino al miglior servizio di taxi boat e al traghetto per Bellagio / Varenna. Non vediamo l'ora di darti il benvenuto!",
77+
'latitude' => 45.4988148,
78+
'longitude' => 9.4230444,
79+
'address' => "Via Ignazio Candiani 2, 20066 Melzo",
80+
'cover_image' => $firstApartmentCoverImage,
81+
'price' => 120,
82+
'is_visible' => true,
83+
];
84+
85+
$secondoApartmentCoverImage = "https://a0.muscache.com/im/ml/photo_enhancement/pictures/miso/Hosting-896390170139549133/original/db18a3fc-627a-4bc0-90a8-e2b8359e29ed.jpeg?im_w=1200&im_format=avif";
86+
87+
88+
Apartment::create($apartment);
89+
90+
// genrate 2 presetted apartments
91+
$apartment = [
92+
'user_id' => 1,
93+
'title' => "Villa Niobe | Appartamento esclusivo con spiaggia privata",
94+
'rooms' => 2,
95+
'beds' => 2,
96+
'bathrooms' => 2,
97+
'square_meters' => 100,
98+
'description' => "Situata a Stresa in uno dei punti panoramici più incantevoli sul lungolago, all'interno di una meravigliosa villa liberty circondata da un rigoglioso giardino e con una spiaggia privata attrezzata, questa esclusiva dimora gode di una vista mozzafiato, arredi eleganti e ampi spazi come una luminosa zona giorno con una superba terrazza con vista sul lago, 2 divani, TV e un grande tavolo da pranzo, una cucina attrezzata, 3 camere da letto doppie, 3 bagni, con WiFi gratuito e parcheggio incluso.",
99+
'latitude' => 45.5043174,
100+
'longitude' => 9.1752495,
101+
'address' => "Via Antonio Carnevali 107, Milano",
102+
'cover_image' => $secondoApartmentCoverImage,
103+
'price' => 100,
104+
'is_visible' => true,
105+
];
106+
107+
Apartment::create($apartment);
108+
109+
110+
111+
64112

65113
for ($i = 0; $i < 50; $i++) {
66114
$latitude = $this->createLatitude($faker);

database/seeders/ImagesSeeder.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,40 @@ public function run(Faker $faker): void
6565
"https://images.pexels.com/photos/271800/pexels-photo-271800.jpeg"
6666
];
6767

68+
$firstApartmentImages = [
69+
"https://a0.muscache.com/im/pictures/05368ed7-e85d-4205-a52e-999c9d361690.jpg?im_w=720&im_format=avif",
70+
"https://a0.muscache.com/im/pictures/00914ffd-8295-4c15-aecf-3789a9276259.jpg?im_w=720&im_format=avif",
71+
"https://a0.muscache.com/im/pictures/72d99846-cf40-4b08-9447-170b4acbe950.jpg?im_w=720&im_format=avif",
72+
"https://a0.muscache.com/im/pictures/de082a8c-0e44-450d-a4ef-3211162ae117.jpg?im_w=1200&im_format=avif",
73+
"https://a0.muscache.com/im/pictures/9c74757a-0c63-4f77-8661-9e8312ece6e7.jpg?im_w=720&im_format=avif",
74+
"https://a0.muscache.com/im/pictures/6c35ea22-7658-49c7-962a-acb905e665cf.jpg?im_w=720&im_format=avif"
75+
];
76+
77+
foreach ($firstApartmentImages as $image) {
78+
Image::create([
79+
'image_path' => $image,
80+
'description' => $faker->sentence(),
81+
'apartment_id' => 1,
82+
]);
83+
}
84+
85+
$secondoApartmentImages = [
86+
"https://a0.muscache.com/im/pictures/miso/Hosting-896390170139549133/original/71b252df-5841-48f0-8fb4-4fd644a662da.jpeg?im_w=1200&im_format=avif",
87+
"https://a0.muscache.com/im/pictures/miso/Hosting-896390170139549133/original/fa53ea99-922a-4dec-b597-30a12d85795d.jpeg?im_w=1200&im_format=avif",
88+
"https://a0.muscache.com/im/ml/photo_enhancement/pictures/hosting/Hosting-U3RheVN1cHBseUxpc3Rpbmc6ODk2MzkwMTcwMTM5NTQ5MTMz/original/7e091010-3a86-4a06-a707-8f894c54cee2.jpeg?im_w=1200&im_format=avif",
89+
"https://a0.muscache.com/im/ml/photo_enhancement/pictures/miso/Hosting-896390170139549133/original/3c82d6e1-b8a1-4d37-9df7-d0c6f028de90.jpeg?im_w=1200&im_format=avif"
90+
];
91+
92+
foreach ($secondoApartmentImages as $image) {
93+
Image::create([
94+
'image_path' => $image,
95+
'description' => $faker->sentence(),
96+
'apartment_id' => 2,
97+
]);
98+
}
99+
100+
101+
68102
foreach (Apartment::all() as $apartment) {
69103
$apartmentId = $apartment->id;
70104

resources/lang/it/auth.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Authentication Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines are used during authentication for various
11+
| messages that we need to display to the user. You are free to modify
12+
| these language lines according to your application's requirements.
13+
|
14+
*/
15+
16+
'failed' => 'These credentials do not match our records.',
17+
'password' => 'The provided password is incorrect.',
18+
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
19+
20+
];

resources/lang/it/pagination.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Pagination Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines are used by the paginator library to build
11+
| the simple pagination links. You are free to change them to anything
12+
| you want to customize your views to better match your application.
13+
|
14+
*/
15+
16+
'previous' => '&laquo; Previous',
17+
'next' => 'Next &raquo;',
18+
19+
];

resources/lang/it/passwords.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Password Reset Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines are the default lines which match reasons
11+
| that are given by the password broker for a password update attempt
12+
| has failed, such as for an invalid token or invalid new password.
13+
|
14+
*/
15+
16+
'reset' => 'Your password has been reset.',
17+
'sent' => 'We have emailed your password reset link.',
18+
'throttled' => 'Please wait before retrying.',
19+
'token' => 'This password reset token is invalid.',
20+
'user' => "We can't find a user with that email address.",
21+
22+
];

resources/lang/it/validation.php

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Linee di Lingua per la Validazione
8+
|--------------------------------------------------------------------------
9+
|
10+
| Le seguenti linee di lingua contengono i messaggi di errore predefiniti utilizzati dalla
11+
| classe di validazione. Alcune di queste regole hanno più versioni, come
12+
| le regole di dimensione. Sentiti libero di modificare ciascuno di questi messaggi qui.
13+
|
14+
*/
15+
16+
'accepted' => 'Il campo :attribute deve essere accettato.',
17+
'accepted_if' => 'Il campo :attribute deve essere accettato quando :other è :value.',
18+
'active_url' => 'Il campo :attribute deve essere un URL valido.',
19+
'after' => 'Il campo :attribute deve essere una data successiva a :date.',
20+
'after_or_equal' => 'Il campo :attribute deve essere una data successiva o uguale a :date.',
21+
'alpha' => 'Il campo :attribute deve contenere solo lettere.',
22+
'alpha_dash' => 'Il campo :attribute deve contenere solo lettere, numeri, trattini e underscore.',
23+
'alpha_num' => 'Il campo :attribute deve contenere solo lettere e numeri.',
24+
'array' => 'Il campo :attribute deve essere un array.',
25+
'ascii' => 'Il campo :attribute deve contenere solo caratteri alfanumerici e simboli.',
26+
'before' => 'Il campo :attribute deve essere una data precedente a :date.',
27+
'before_or_equal' => 'Il campo :attribute deve essere una data precedente o uguale a :date.',
28+
'between' => [
29+
'array' => 'Il campo :attribute deve contenere tra :min e :max elementi.',
30+
'file' => 'Il campo :attribute deve essere tra :min e :max kilobytes.',
31+
'numeric' => 'Il campo :attribute deve essere tra :min e :max.',
32+
'string' => 'Il campo :attribute deve essere tra :min e :max caratteri.',
33+
],
34+
'boolean' => 'Il campo :attribute deve essere true o false.',
35+
'can' => 'Il campo :attribute contiene un valore non autorizzato.',
36+
'confirmed' => 'La conferma del campo :attribute non corrisponde.',
37+
'current_password' => 'La password è errata.',
38+
'date' => 'Il campo :attribute deve essere una data valida.',
39+
'date_equals' => 'Il campo :attribute deve essere una data uguale a :date.',
40+
'date_format' => 'Il campo :attribute deve corrispondere al formato :format.',
41+
'decimal' => 'Il campo :attribute deve avere :decimal decimali.',
42+
'declined' => 'Il campo :attribute deve essere rifiutato.',
43+
'declined_if' => 'Il campo :attribute deve essere rifiutato quando :other è :value.',
44+
'different' => 'Il campo :attribute e :other devono essere diversi.',
45+
'digits' => 'Il campo :attribute deve contenere :digits cifre.',
46+
'digits_between' => 'Il campo :attribute deve contenere tra :min e :max cifre.',
47+
'dimensions' => 'Il campo :attribute ha dimensioni di immagine non valide.',
48+
'distinct' => 'Il campo :attribute ha un valore duplicato.',
49+
'doesnt_end_with' => 'Il campo :attribute non deve terminare con uno dei seguenti: :values.',
50+
'doesnt_start_with' => 'Il campo :attribute non deve iniziare con uno dei seguenti: :values.',
51+
'email' => 'Il campo :attribute deve essere un indirizzo email valido.',
52+
'ends_with' => 'Il campo :attribute deve terminare con uno dei seguenti: :values.',
53+
'enum' => 'Il campo :attribute selezionato è invalido.',
54+
'exists' => 'Il campo :attribute selezionato è invalido.',
55+
'extensions' => 'Il campo :attribute deve avere una delle seguenti estensioni: :values.',
56+
'file' => 'Il campo :attribute deve essere un file.',
57+
'filled' => 'Il campo :attribute deve avere un valore.',
58+
'gt' => [
59+
'array' => 'Il campo :attribute deve contenere più di :value elementi.',
60+
'file' => 'Il campo :attribute deve essere maggiore di :value kilobytes.',
61+
'numeric' => 'Il campo :attribute deve essere maggiore di :value.',
62+
'string' => 'Il campo :attribute deve essere maggiore di :value caratteri.',
63+
],
64+
'gte' => [
65+
'array' => 'Il campo :attribute deve contenere :value elementi o più.',
66+
'file' => 'Il campo :attribute deve essere maggiore o uguale a :value kilobytes.',
67+
'numeric' => 'Il campo :attribute deve essere maggiore o uguale a :value.',
68+
'string' => 'Il campo :attribute deve essere maggiore o uguale a :value caratteri.',
69+
],
70+
'hex_color' => 'Il campo :attribute deve essere un colore esadecimale valido.',
71+
'image' => 'Il campo :attribute deve essere un\'immagine.',
72+
'in' => 'Il campo :attribute selezionato è invalido.',
73+
'in_array' => 'Il campo :attribute deve esistere in :other.',
74+
'integer' => 'Il campo :attribute deve essere un intero.',
75+
'ip' => 'Il campo :attribute deve essere un indirizzo IP valido.',
76+
'ipv4' => 'Il campo :attribute deve essere un indirizzo IPv4 valido.',
77+
'ipv6' => 'Il campo :attribute deve essere un indirizzo IPv6 valido.',
78+
'json' => 'Il campo :attribute deve essere una stringa JSON valida.',
79+
'lowercase' => 'Il campo :attribute deve essere in minuscolo.',
80+
'lt' => [
81+
'array' => 'Il campo :attribute deve avere meno di :value elementi.',
82+
'file' => 'Il campo :attribute deve essere meno di :value kilobytes.',
83+
'numeric' => 'Il campo :attribute deve essere meno di :value.',
84+
'string' => 'Il campo :attribute deve essere meno di :value caratteri.',
85+
],
86+
'lte' => [
87+
'array' => 'Il campo :attribute non deve avere più di :value elementi.',
88+
'file' => 'Il campo :attribute deve essere minore o uguale a :value kilobytes.',
89+
'numeric' => 'Il campo :attribute deve essere minore o uguale a :value.',
90+
'string' => 'Il campo :attribute deve essere minore o uguale a :value caratteri.',
91+
],
92+
'mac_address' => 'Il campo :attribute deve essere un indirizzo MAC valido.',
93+
'max' => [
94+
'array' => 'Il campo :attribute non deve avere più di :max elementi.',
95+
'file' => 'Il campo :attribute non deve essere maggiore di :max kilobytes.',
96+
'numeric' => 'Il campo :attribute non deve essere maggiore di :max.',
97+
'string' => 'Il campo :attribute non deve essere maggiore di :max caratteri.',
98+
],
99+
'max_digits' => 'Il campo :attribute non deve avere più di :max cifre.',
100+
'mimes' => 'Il campo :attribute deve essere un file di tipo: :values.',
101+
'mimetypes' => 'Il campo :attribute deve essere un file di tipo: :values.',
102+
'min' => [
103+
'array' => 'Il campo :attribute deve avere almeno :min elementi.',
104+
'file' => 'Il campo :attribute deve essere almeno :min kilobytes.',
105+
'numeric' => 'Il campo :attribute deve essere almeno :min.',
106+
'string' => 'Il campo :attribute deve essere almeno :min caratteri.',
107+
],
108+
'min_digits' => 'Il campo :attribute deve avere almeno :min cifre.',
109+
'missing' => 'Il campo :attribute deve essere mancante.',
110+
'missing_if' => 'Il campo :attribute deve essere mancante quando :other è :value.',
111+
'missing_unless' => 'Il campo :attribute deve essere mancante a meno che :other non sia :value.',
112+
'missing_with' => 'Il campo :attribute deve essere mancante quando :values è presente.',
113+
'missing_with_all' => 'Il campo :attribute deve essere mancante quando :values sono presenti.',
114+
'multiple_of' => 'Il campo :attribute deve essere un multiplo di :value.',
115+
'not_in' => 'Il :attribute selezionato è invalido.',
116+
'not_regex' => 'Il formato del campo :attribute è invalido.',
117+
'numeric' => 'Il campo :attribute deve essere un numero.',
118+
'password' => [
119+
'letters' => 'Il campo :attribute deve contenere almeno una lettera.',
120+
'mixed' => 'Il campo :attribute deve contenere almeno una lettera maiuscola e una minuscola.',
121+
'numbers' => 'Il campo :attribute deve contenere almeno un numero.',
122+
'symbols' => 'Il campo :attribute deve contenere almeno un simbolo.',
123+
'uncompromised' => 'Il :attribute fornito è apparso in una violazione dei dati. Si prega di scegliere un altro :attribute.',
124+
],
125+
'present' => 'Il campo :attribute deve essere presente.',
126+
'present_if' => 'Il campo :attribute deve essere presente quando :other è :value.',
127+
'present_unless' => 'Il campo :attribute deve essere presente a meno che :other non sia :value.',
128+
'present_with' => 'Il campo :attribute deve essere presente quando :values è presente.',
129+
'present_with_all' => 'Il campo :attribute deve essere presente quando :values sono presenti.',
130+
'prohibited' => 'Il campo :attribute è vietato.',
131+
'prohibited_if' => 'Il campo :attribute è vietato quando :other è :value.',
132+
'prohibited_unless' => 'Il campo :attribute è vietato a meno che :other non sia in :values.',
133+
'prohibits' => 'Il campo :attribute vieta :other di essere presente.',
134+
'regex' => 'Il formato del campo :attribute è invalido.',
135+
'required' => 'Il campo :attribute è obbligatorio.',
136+
'required_array_keys' => 'Il campo :attribute deve contenere voci per: :values.',
137+
'required_if' => 'Il campo :attribute è obbligatorio quando :other è :value.',
138+
'required_if_accepted' => 'Il campo :attribute è obbligatorio quando :other è accettato.',
139+
'required_unless' => 'Il campo :attribute è obbligatorio a meno che :other non sia in :values.',
140+
'required_with' => 'Il campo :attribute è obbligatorio quando :values è presente.',
141+
'required_with_all' => 'Il campo :attribute è obbligatorio quando :values sono presenti.',
142+
'required_without' => 'Il campo :attribute è obbligatorio quando :values non è presente.',
143+
'required_without_all' => 'Il campo :attribute è obbligatorio quando nessuno di :values è presente.',
144+
'same' => 'Il campo :attribute deve corrispondere a :other.',
145+
'size' => [
146+
'array' => 'Il campo :attribute deve contenere :size elementi.',
147+
'file' => 'Il campo :attribute deve essere :size kilobytes.',
148+
'numeric' => 'Il campo :attribute deve essere :size.',
149+
'string' => 'Il campo :attribute deve essere :size caratteri.',
150+
],
151+
'starts_with' => 'Il campo :attribute deve iniziare con uno dei seguenti: :values.',
152+
'string' => 'Il campo :attribute deve essere una stringa.',
153+
'timezone' => 'Il campo :attribute deve essere un fuso orario valido.',
154+
'unique' => 'Il :attribute è già stato preso.',
155+
'uploaded' => 'Il campo :attribute non è riuscito a caricare.',
156+
'uppercase' => 'Il campo :attribute deve essere in maiuscolo.',
157+
'url' => 'Il campo :attribute deve essere un URL valido.',
158+
'ulid' => 'Il campo :attribute deve essere un ULID valido.',
159+
'uuid' => 'Il campo :attribute deve essere un UUID valido.',
160+
161+
/*
162+
|--------------------------------------------------------------------------
163+
| Linee di Lingua per la Validazione Personalizzate
164+
|--------------------------------------------------------------------------
165+
|
166+
| Qui puoi specificare messaggi di validazione personalizzati per gli attributi utilizzando la
167+
| convenzione "attribute.rule" per nominare le linee. Questo rende veloce
168+
| specificare una linea di lingua personalizzata per una data regola di attributo.
169+
|
170+
*/
171+
172+
'custom' => [
173+
'attribute-name' => [
174+
'rule-name' => 'custom-message',
175+
],
176+
],
177+
178+
/*
179+
|--------------------------------------------------------------------------
180+
| Attributi di Validazione Personalizzati
181+
|--------------------------------------------------------------------------
182+
|
183+
| Le seguenti linee di lingua vengono utilizzate per sostituire il nostro segnaposto di attributo
184+
| con qualcosa di più leggibile, come "Indirizzo E-Mail" invece
185+
| di "email". Questo ci aiuta semplicemente a rendere il nostro messaggio più espressivo.
186+
|
187+
*/
188+
189+
'attributes' => [],
190+
191+
];

0 commit comments

Comments
 (0)