Commit 97a3031e authored by abkrim's avatar abkrim 😀
Browse files

07 Stilyng now work

parent 2545067b
Pipeline #489 passed with stages
in 1 minute and 51 seconds
......@@ -4,7 +4,7 @@ namespace App\Http\Livewire\Auth;
use App\Models\User;
use Livewire\Component;
use Hash;
use Illuminate\Support\Facades\Hash;
use Log;
class Register extends Component
......
......@@ -2,20 +2,17 @@
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class User extends Authenticatable
{
use HasFactory, Notifiable;
protected $fillable = [
'name',
'email',
'password',
];
protected $fillable = ['name','email', 'password'];
// protected $guarded = [];
protected $hidden = [
'password',
......
......@@ -15,7 +15,7 @@ class CreateUsersTable extends Migration
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('name')->nullable(false);
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
......
......@@ -13,6 +13,6 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
// \App\Models\User::factory(10)->create();
\App\Models\User::factory(10)->create();
}
}
......@@ -6,13 +6,24 @@
<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
<form wire:submit.prevent="register" action="#" method="POST">
<div>
<label for="name" class="block text-sm font-medium text-gray-700">
Name
</label>
<div class="mt-1 rounded-md shadow-md">
<input wire:model="name" id="name" name="name" type="text" autocomplete="text"
class="@error('name') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
@error('name') <div class="mt-1 text-red-500 text-sm">{{ $message }}</div> @enderror
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700">
Email address
</label>
<div class="mt-1 rounded-md shadow-md">
<input wire:model="email" id="email" name="email" type="email" autocomplete="email"
required class="@error('email') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
class="@error('email') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
@error('email') <div class="mt-1 text-red-500 text-sm">{{ $message }}</div> @enderror
</div>
......@@ -23,7 +34,7 @@
</label>
<div class="mt-1">
<input wire:model.lazy="password" id="password" name="password" type="password" autocomplete="current-password"
required class="@error('password') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
class="@error('password') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
@error('password') <div class="mt-1 text-red-500 text-sm">{{ $message }}</div> @enderror
</div>
......@@ -33,7 +44,7 @@
</label>
<div class="mt-1">
<input wire:model.lazy="passwordConfirmation" id="passwordConfirmation" name="passwordConfirmation" type="password" autocomplete="current-password"
required class="@error('passwordConfirmation') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
class="@error('passwordConfirmation') border-red-500 @enderror appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm">
</div>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment