Can I use cue to get latavels auntenticated user information?

|
JonsM90 2021-09-21 20:14:41
php in max_execution_time = 3600
ImNaryan 2021-09-21 21:35:18
Hi , I am trying to authenticate api calls in my laravel application. I have installed Passport following the documentation and I think I have not missed anything. but API call returns a 401 Unauthenticated.
this is my Auth.php :

‘guards’ => [
‘web’ => [
‘driver’ => ‘session’,
‘provider’ => ‘users’,
],

‘api’ => [
‘driver’ => ‘passport’,
‘provider’ => ‘users’,
‘hash’ => false,
],
],

ImNaryan 2021-09-21 21:36:02
ImNaryan 2021-09-21 21:35:18
Hi , I am trying to authenticate api calls in my laravel application. I have installed Passport following the documentation and I think I have not missed anything. but API call returns a 401 Unauthenticated.
this is my Auth.php :

‘guards’ => [
‘web’ => [
‘driver’ => ‘session’,
‘provider’ => ‘users’,
],

‘api’ => [
‘driver’ => ‘passport’,
‘provider’ => ‘users’,
‘hash’ => false,
],
],

laravel_discuss-95172.jpg
and header

ImNaryan 2021-09-21 21:39:30
ImNaryan 2021-09-21 21:35:18
Hi , I am trying to authenticate api calls in my laravel application. I have installed Passport following the documentation and I think I have not missed anything. but API call returns a 401 Unauthenticated.
this is my Auth.php :

‘guards’ => [
‘web’ => [
‘driver’ => ‘session’,
‘provider’ => ‘users’,
],

‘api’ => [
‘driver’ => ‘passport’,
‘provider’ => ‘users’,
‘hash’ => false,
],
],

i try many way but not work , i add this code
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
to .htaccess but not effect

itsAxton 2021-09-21 22:55:16
Can I use cue to get latavels auntenticated user information ?
itsAxton 2021-09-21 22:57:39
I’m new on mix ( Laravel + vue)
itsAxton 2021-09-21 22:58:07
Or use php inside a vue component
itsAxton 2021-09-21 22:58:33
I tried but it’s being read as plain text
etekumoses 2021-09-22 00:05:50
why am i able to only see 10 records yet i have more than 300
etekumoses 2021-09-22 00:06:33
laravel_discuss-95184.jpg

etekumoses 2021-09-22 00:07:03
laravel_discuss-95185.jpg
this is my table display
khamroev 2021-09-22 00:21:15
etekumoses 2021-09-22 00:07:03
this is my table display

Can I see your controller?

etekumoses 2021-09-22 00:23:53
haha i have fixed it
etekumoses 2021-09-22 00:24:15
i had used public static function getAllTickets(){
return Ticket::orderBy(‘ticketNo’,’DESC’)->paginate(10);
}
etekumoses 2021-09-22 00:24:27
how can i make it open
etekumoses 2021-09-22 00:24:38
without the pagenation
khamroev 2021-09-22 00:25:14
etekumoses 2021-09-22 00:24:38
without the pagenation

Just remove ->paginate(10);

public static function getAllTickets(){
return Ticket::orderBy(‘ticketNo’,’DESC’)->get();
}

etekumoses 2021-09-22 00:26:47
this bring errors in the view
etekumoses 2021-09-22 00:27:27
count(): Parameter must be an array or an object that implements Countable
khamroev 2021-09-22 00:27:56
etekumoses 2021-09-22 00:27:27
count(): Parameter must be an array or an object that implements Countable

I edited my answer, check it out

etekumoses 2021-09-22 00:28:53
perfect
etekumoses 2021-09-22 00:29:05
haha 😃
ImNaryan 2021-09-22 00:42:22
ImNaryan 2021-09-21 21:35:18
Hi , I am trying to authenticate api calls in my laravel application. I have installed Passport following the documentation and I think I have not missed anything. but API call returns a 401 Unauthenticated.
this is my Auth.php :

‘guards’ => [
‘web’ => [
‘driver’ => ‘session’,
‘provider’ => ‘users’,
],

‘api’ => [
‘driver’ => ‘passport’,
‘provider’ => ‘users’,
‘hash’ => false,
],
],

nobody can’t help me …
my problem do not solve yet

Ruben Ramírez 2021-09-22 00:42:41
maybe nobody can
Ruben Ramírez 2021-09-22 00:42:57
onlye the nasa
khamroev 2021-09-22 00:47:46
ImNaryan 2021-09-21 21:39:30
i try many way but not work , i add this code
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
to .htaccess but not effect

you can go into your /etc/apache2/apache2.conf file and at the very bottom, paste:

SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

Also, in apache server root htaccess:

RewriteCond %{HTTP:Authorization} .
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

etekumoses 2021-09-22 00:49:23
How can i pop a modal when a new message arrives
etekumoses 2021-09-22 00:52:45
laravel_discuss-95205.jpg
i have these new messages i want to pop up a modal dialog when it is sent by the user the admin controller should see the prompt when i logs in
khamroev 2021-09-22 00:54:00
Did it work?
etekumoses 2021-09-22 00:54:00
how can i achieve it currently i have the read_at column with either 1 or 0 so when its not read the message appears on that header if not it doesnt
etekumoses 2021-09-22 00:54:55
and also its my first laravel project🙏 i just started learning it this year
ImNaryan 2021-09-22 01:04:54
khamroev 2021-09-22 00:54:00
Did it work?

laravel_discuss-95209.jpg
Now, I tried it but show that error again yet

Dkhicher 2021-09-22 03:14:42
ImNaryan 2021-09-22 01:04:54
Now, I tried it but show that error again yet

Its show unauthenticed mean your token may be expired or wrong

Dkhicher 2021-09-22 03:14:54
Check your token
bunny99143 2021-09-22 04:15:54
Dkhicher 2021-09-22 03:14:42
Its show unauthenticed mean your token may be expired or wrong

you can try after config:cache and config:clear then again server restart and check with new token

|