GeezerVison is showing github.com — Working on Users Address Book · rubythonode/App-2@bca0eda
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: app/User.php +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
16 | 16 | use Illuminate\Notifications\Notifiable; |
17 | 17 | use Illuminate\Database\Eloquent\SoftDeletes; |
18 | 18 | use Illuminate\Auth\Passwords\CanResetPassword; |
19 | | -use Antvel\Components\AddressBook\Models\Address; |
20 | 19 | use App\Notifications\Auth\ResetPasswordNotification; |
21 | 20 | use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; |
22 | 21 | use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; |
23 | 22 |
|
| 23 | +use Antvel\AddressBook\Models\Address; |
| 24 | + |
24 | 25 | class User extends Model implements AuthenticatableContract, CanResetPasswordContract |
25 | 26 | { |
26 | 27 | use Authenticatable, CanResetPassword, SoftDeletes, Notifiable; |
|
Collapse file
Copy file name to clipboardExpand all lines: config/app.php +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
214 | 214 | App\Providers\EventServiceProvider::class, |
215 | 215 | App\Providers\RouteServiceProvider::class, |
216 | 216 | Illuminate\Notifications\NotificationServiceProvider::class, |
217 | | - Antvel\ServiceProvider::class, |
| 217 | + |
| 218 | + Antvel\AntvelServiceProvider::class, |
218 | 219 |
|
219 | 220 | /* |
220 | 221 | * Providers Vendors |
|
Collapse file
Copy file name to clipboardExpand all lines: database/migrations/2015_03_12_204126_create_addresses_table.php -48Lines changed: 0 additions & 48 deletions Collapse file
Copy file name to clipboardExpand all lines: database/seeds/AddressesTableSeeder.php +8-3Lines changed: 8 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | * |
7 | 7 | |
8 | 8 | */ |
9 | | -use App\Address as Address; |
| 9 | + |
10 | 10 | use App\User as User; |
11 | 11 | use Faker\Factory as Faker; |
12 | 12 | use Illuminate\Database\Seeder; |
| 13 | +use Antvel\AddressBook\Models\Address; |
13 | 14 |
|
14 | 15 | class AddressesTableSeeder extends Seeder |
15 | 16 | { |
16 | 17 | public function run() |
17 | 18 | { |
18 | 19 | $faker = Faker::create(); |
19 | | - //Category |
| 20 | + |
20 | 21 | for ($i = 0; $i < 10; $i++) { |
21 | | - $user = User::select(['id'])->where('id', rand(1, User::count()))->first(); |
| 22 | + |
| 23 | + $user = User::select('id') |
| 24 | + ->inRandomOrder() |
| 25 | + ->first(); |
| 26 | + |
22 | 27 | $address = Address::create([ |
23 | 28 | 'user_id' => ($i <= 2) ? 4 : $user->id, |
24 | 29 | 'default' => 0, |
|
Collapse file
Copy file name to clipboardExpand all lines: database/seeds/FreeProductsTableSeeder.php +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | * |
7 | 7 | |
8 | 8 | */ |
9 | | -use App\Address; |
| 9 | +use Antvel\AddressBook\Models\Address; |
10 | 10 | use App\FreeProduct; |
11 | 11 | use App\FreeProductOrder; |
12 | 12 | use App\Order; |
|
Collapse file
Copy file name to clipboardExpand all lines: database/seeds/OrdersTableSeeder.php +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | * |
7 | 7 | |
8 | 8 | */ |
9 | | -use App\Address; |
| 9 | +use Antvel\AddressBook\Models\Address; |
10 | 10 | use App\Order; |
11 | 11 | use App\OrderDetail; |
12 | 12 | use App\Product; |
|
Collapse file
Copy file name to clipboardExpand all lines: database/seeds/ProductsRatesSeeder.php +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | * |
7 | 7 | |
8 | 8 | */ |
9 | | -use App\Address; |
| 9 | +use Antvel\AddressBook\Models\Address; |
10 | 10 | use App\Category; |
11 | 11 | use App\Order; |
12 | 12 | use App\Product; |
|