skip to Main Content

Laravel : JWT Auth access auth()->user() return null

i am trying to use JWT for api authentication i am building, i have managed to get the JWT token with code like the following. $user = User::select('id_user', DB::raw('AES_DECRYPT(id_user, "nur") as username')) ->where('id_user', DB::raw('AES_ENCRYPT("' . $credentials['username'] . '", "...")')) ->where('password',…

VIEW QUESTION

Laravel date cast

Hello Every I want to use Laravel default casts feature, where if I access created_at property of a post model. I would like the following output from the following code: Code: $timepassed = $post->created_at; Desired Output: 2 hours ago The…

VIEW QUESTION

Laravel class based components class being ignored

I have laravel component created in nested folders in app/view/components/modules/Exchange/common and i use this component like this in the code: <x-modules.Exchange.common.text-input placeholder="{{ __('Email') }}" label="{{ __('Email') }}" icon="ni ni-envelope" id="email_input" name="account_email" /> the problem is that component class that has…

VIEW QUESTION
Back To Top
Search