I made a change in the question that had been written in the wrong way
Custom passport is not support currently, I'll woking for this.
I'd love to see php artisan make:auth compatibility.
Actually, it turned out to be surprisingly easy to get make:auth compatibility. The biggest problem is that username field is not configurable in laravel-admin, otherwise it would've been a few lines of code
Anyway, here's how to make laravel-admin make:auth compatible (with password reset and all).
1) copy vendor/encore/laravel-admin/views/login.blade.php to resources/views/admin/login.blade.php
2) replace username with email everywhere in that file
3) in config/admin.php replace admin_users with users
4) in config/auth.php replace 'guard' => 'web', with 'guard' => 'admin',
5) copy cp vendor/encore/laravel-admin/src/Controllers/AuthController.php to app/Admin/Controllers/AuthController.php
6) replace username with email
7) replace namespace Encore\Admin\Controllers; to namespace App\Admin\Controllers;
8) replace admin::login with admin.login (not sure why it's not picking up cusom view)
9) add to app/Admin/routes.php:
$router->get('/auth/login', '\\App\\Admin\\Controllers\\AuthController@getLogin');
$router->post('/auth/login', '\\App\\Admin\\Controllers\\AuthController@postLogin');
$router->get('auth/setting', '\\App\\Admin\\Controllers\\AuthController@getSetting');
$router->put('auth/setting', '\\App\\Admin\\Controllers\\AuthController@putSetting');
If laravel-admin were to replace 'username' with something like config('admin.username_field') - that would've been much easier! (only config changes)
Most helpful comment
Actually, it turned out to be surprisingly easy to get
make:authcompatibility. The biggest problem is thatusernamefield is not configurable in laravel-admin, otherwise it would've been a few lines of codeAnyway, here's how to make laravel-admin
make:authcompatible (with password reset and all).1) copy
vendor/encore/laravel-admin/views/login.blade.phptoresources/views/admin/login.blade.php2) replace
usernamewithemaileverywhere in that file3) in config/admin.php replace
admin_userswithusers4) in config/auth.php replace
'guard' => 'web',with'guard' => 'admin',5) copy
cp vendor/encore/laravel-admin/src/Controllers/AuthController.phptoapp/Admin/Controllers/AuthController.php6) replace
usernamewithemail7) replace
namespace Encore\Admin\Controllers;tonamespace App\Admin\Controllers;8) replace
admin::loginwithadmin.login(not sure why it's not picking up cusom view)9) add to
app/Admin/routes.php:If
laravel-adminwere to replace'username'with something likeconfig('admin.username_field')- that would've been much easier! (only config changes)