我是使用Laravel的新手,我遇到了一些問題。當我使用以下命令創建auth時:如何在Laravel中進行自定義身份驗證查詢
php artisan make:auth
它會自動創建Auth控制器,視圖和默認用戶表。 在這裏,我想做一些不同的認證。我有這樣一個表:
員工
id | reg_number | name
用戶
id | name | password | remember_token | employee_id | created_at | updated_at
當我登錄,我想加入employees
和users
表,所以查詢會如:
select users.*, employees.reg_number inner join employees on employees.id = users.employee_id
然後,我想使用reg_number
和password
登錄。
我該如何創建類似的東西?
我一直在很多網站上搜索,但還沒有找到任何解決方案。預先感謝您的答案。
https://laravel.io/forum/11-04-2014-laravel-5-how-do-i-create-a-custom-auth-in-laravel-5 – sumit