Cześć, mam taki problem.
Chcę stworzyć coś takiego, że przy logowaniu będzie sprawdzane czy logujący się użytkownik jest aktywny.
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
/**
* Set the default image, until the user changes it.
*/
$table->string('image')->default('default.png');
$table->boolean('active')->default(true);
$table->rememberToken();
$table->timestamps();
});
}
tak wygląda moja table z użytkownikami
w sieci znalazłem coś takiego
if (Auth::attempt(['email' => $email, 'password' => $password, 'active' => 1])) {
// The user is active, not suspended, and exists.
}
jednak to nie działa :(
Wie ktoś jak coś takiego wykonać ?