1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Laravel 認証で$requestは合っているのに認証されなかった理由

Posted at

#Laravel5.7の認証で$requestの値は合っているのにLoginができなかった理由

マルチ認証でAdminのデータをseederファイルに書いてDBに入れた。

その時に'password' => 'passwordとそのままにしていたので値は合っているのにloginができなかった。

'password' => Hash::make('password')
Hash化しないといけないようでした:dancers:
もし同じように悩んでる人の手伝いになればウレシスです:relaxed:

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class BrandsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('brands')->insert([
            [
                'created_at' => date('Y-m-d H:i:s'),
                'brand_name' => 'Apuweiser-riche',
                'brand_name_kana' =>'アプワイザーリッシェ' ,
                'category' => 'feminine',
                'password' => Hash::make('password'),
            ],
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?