skip to Main Content

Laravel query idea

I'm a bit stuck writing something that should be pretty simple, so I need your help. I have one main table "posts", and two other related tables "categories" and "sectors". I'm making the filter route, and the logic should be…

VIEW QUESTION

Laravel Passport Api

BadMethodCallException: Method LaravelPassportGuardsTokenGuard::attempt does not exist. in file C:xampphtdocstestpassportapilaravel-backend-apivendorlaravelframeworksrcIlluminateMacroableTraitsMacroable.php on line 112 auth()->guard('api')->attempt($request->only(['email', 'password']))) This is supported passport or not, because this error shows at my end. How to solve this? config->auth.php `page` 'company' => [ 'driver' => 'session', 'provider'…

VIEW QUESTION

Laravel Controller date query

this is my code in my controller: public function getPublicPost($school_id){ $public_feeds = app(AllyFeedRepository::class)->query() ->whereHas('user_detail', function($q){ $q->whereNull('deleted_at'); }) ->with('user_detail:id,name,profile_photo_path,deleted_at','userInstance:id,user_id,role_id','userInstance.role:id,name','announcement:id,description,file_path,type,deleted_at') ->whereSchoolId($school_id) ->orWhere('school_id' ,'=', null) ->orderBy('created_at','DESC') ->paginate(15); return $public_feeds; } then I add ->whereDate('deadline_viewing', '>=', now()) in my query suddenly I can't fetch…

VIEW QUESTION
Back To Top
Search