Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How I use laravel passport with this mongodb package ? As I creating Apis for my project so I require passport package. #2928

Closed
boss554 opened this issue May 3, 2024 · 3 comments

Comments

@boss554
Copy link

boss554 commented May 3, 2024

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.

@bisht2050
Copy link
Contributor

We tentatively plan to work on Passport support in the second half of this year. Please follow PHPORM-178 for updates.

@masterbater
Copy link
Contributor

masterbater commented Aug 21, 2024

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

@GromNaN
Copy link
Member

GromNaN commented Aug 21, 2024

Thank you @masterbater, that's exactly why we created the DocumentModel trait.

@GromNaN GromNaN closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants