laravel-mongodb
laravel-mongodb copied to clipboard
How I use laravel passport with this mongodb package ? As I creating Apis for my project so I require passport package.
Is your feature request related to a problem?
A clear and concise description of what the problem is.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
We tentatively plan to work on Passport support in the second half of this year. Please follow PHPORM-178 for updates.
Is your feature request related to a problem?
A clear and concise description of what the problem is.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
https://laravel.com/docs/11.x/passport#overriding-default-models
and use the DocumentModel trait
use Laravel\Passport\Client as PassportClient;
use MongoDB\Laravel\Eloquent\DocumentModel;
class Client extends PassportClient
{
use DocumentModel;
}
I havent tested it with passport but most of third party packages I use, all of it work using the DocumentModel trait for Custom Model that has an extends Class already
Thank you @masterbater, that's exactly why we created the DocumentModel
trait.