Skip to content

Tag: laravel

Failed Login with Tymon JWT Auth Laravel 8

When I try to get token with login function I get this error TypeError: Argument 1 passed to TymonJWTAuthJWTGuard::login() must be an instance of TymonJWTAuthContractsJWTSubject, instance of AppModelsUser given, called in …vendortymonjwt-authsrcJWTGuard.php on line 127 in file …vendortymonjwt-auth…

laravel write multiple where clause to filter files

I don’t know how to filter this in my laravel 9 app using eloquent. I am having a files table and file_metadata (pivot) – where files has multiple metas: ex: file_metadata for 3 files: So files 5 ,6 ,7 have 2 metas (3 active, 6 signed). File 7 is active but not signed. How to write the where claus…

Get Laravel route with optional parameter

I was wondering if it’s possible to get the full url/path in Laravel with a optional parameter in it. In web.php I have this: And want to get the full url/path with this: But only ‘var1’ appears. How come? In the manual there are no examples. Answer The parameters should be in an array like: