Created
September 20, 2023 14:02
-
-
Save abenevaut/f5a027d2882e4fed386aaf7acdca4f34 to your computer and use it in GitHub Desktop.
Laravel Passport with sql serv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Laravel\Passport\Passport; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register any application services. | |
*/ | |
public function register(): void | |
{ | |
// | |
} | |
/** | |
* Bootstrap any application services. | |
*/ | |
public function boot(): void | |
{ | |
Passport::useClientModel(\App\Models\Client::class); | |
Passport::usePersonalAccessClientModel(\App\Models\PersonalAccessClient::class); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
use Laravel\Passport\PersonalAccessClient as PassportPersonalAccessClient; | |
class PersonalAccessClient extends \Laravel\Passport\PersonalAccessClient | |
{ | |
protected $dateFormat = 'Y-d-m H:i:s.v'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models; | |
use Laravel\Passport\Client as PassportClient; | |
class Client extends PassportClient | |
{ | |
protected $dateFormat = 'Y-d-m H:i:s.v'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment