Skip to content

Commit e0dfbe7

Browse files
Merge pull request #1 from ovidiustanc123/update
Update 2
2 parents 4f603be + 8cf400d commit e0dfbe7

File tree

1,628 files changed

+96594
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,628 files changed

+96594
-18
lines changed

app/Http/Livewire/Login.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\Http\Livewire;
4+
5+
use Livewire\Component;
6+
7+
class Login extends Component
8+
{
9+
public function render()
10+
{
11+
return view('livewire.auth.login');
12+
}
13+
}

app/Http/Livewire/Profile.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\Http\Livewire;
4+
5+
use Livewire\Component;
6+
7+
class Profile extends Component
8+
{
9+
public function render()
10+
{
11+
return view('livewire.profile');
12+
}
13+
}

app/Http/Livewire/Register.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace App\Http\Livewire;
4+
5+
use Livewire\Component;
6+
7+
class Register extends Component
8+
{
9+
public function render()
10+
{
11+
return view('livewire.auth.register')
12+
->layout('layouts.base');
13+
}
14+
}

app/View/Components/Layouts/Base.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace App\View\Components\Layouts;
4+
5+
use Illuminate\View\Component;
6+
7+
class Base extends Component
8+
{
9+
/**
10+
* Create a new component instance.
11+
*
12+
* @return void
13+
*/
14+
public function __construct()
15+
{
16+
//
17+
}
18+
19+
/**
20+
* Get the view / contents that represent the component.
21+
*
22+
* @return \Illuminate\View\View|string
23+
*/
24+
public function render()
25+
{
26+
return view('layouts.base');
27+
}
28+
}

database/factories/UserFactory.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Database\Factories;
44

55
use App\Models\User;
6+
use Illuminate\Support\Arr;
67
use Illuminate\Database\Eloquent\Factories\Factory;
78
use Illuminate\Support\Str;
89

@@ -23,10 +24,13 @@ class UserFactory extends Factory
2324
public function definition()
2425
{
2526
return [
26-
'name' => $this->faker->name(),
27+
'First Name' => $this->faker->firstName(),
28+
'Last Name' => $this->faker->lastName(),
29+
'Gender' => Arr::random(['male', 'female', 'other']),
2730
'email' => $this->faker->unique()->safeEmail(),
2831
'email_verified_at' => now(),
2932
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
33+
'Phone' => $this->faker->phoneNumber,
3034
'remember_token' => Str::random(10),
3135
];
3236
}

database/migrations/2014_10_12_000000_create_users_table.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ class CreateUsersTable extends Migration
1414
public function up()
1515
{
1616
Schema::create('users', function (Blueprint $table) {
17-
$table->id();
18-
$table->string('name');
19-
$table->string('email')->unique();
20-
$table->timestamp('email_verified_at')->nullable();
17+
$table->increments('id')->unique();
18+
$table->string('First Name')->nullable();
19+
$table->string('Last Name')->nullable();
20+
$table->string('Gender')->nullable();
21+
$table->string('Email')->unique();
2122
$table->string('password');
23+
$table->string('Phone');
24+
$table->timestamp('email_verified_at')->nullable();
2225
$table->rememberToken();
2326
$table->timestamps();
2427
});

database/seeders/DatabaseSeeder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ class DatabaseSeeder extends Seeder
1313
*/
1414
public function run()
1515
{
16-
// \App\Models\User::factory(10)->create();
16+
\App\Models\User::factory(10)->create();
1717
}
1818
}

0 commit comments

Comments
 (0)