I am beginner in Laravel. I use in my project Laravel 5.8.
I use Laravel login system in my project.
I have my user migration:
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('company_id')->unsigned();
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
$table->char('enable', 1)->default(0);
$table->char('demo_mode', 1)->default(0);
$table->date('account_paid_for');
$table->string('name', 120)->nullable();
$table->string('surname', 120)->nullable();
$table->string('email', 120)->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('url_address', 160);
$table->text('content')->nullable();
$table->dateTime('last_activity')->nullable();
$table->rememberToken();
$table->timestamps();
$table->engine = "InnoDB";
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
});
I need to change Laravel's default login to verify that enable = 1
Only users with enable = 1 can log in. How to do it
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire