Can anybody help to get user information after login and display them in json format for API usage?

|
praneet81 2019-03-15 11:50:46
Mehrnoosh Abdollahi 2019-03-15 11:03:55
Photo from mehrnoosh

You haven’t made this view it seems

2019-03-15 20:54:24
try with:

return view(‘inc.search’, [‘categories’ => $categories]);

x0x3b 2019-03-15 20:56:09
forech
mrmmp 2019-03-15 20:57:01
try : php artisan view:clear
mrmmp 2019-03-15 21:01:47
ok maybe something mutates categories, lets just rename it to something else
mrmmp 2019-03-15 21:04:21
but beforehand could you dd($categories) in the controller before sending it to the view ? and see what does it have ?
2019-03-15 21:04:52
does ur database have enough data for categories !?
2019-03-15 21:44:49
Free
mrmmp 2019-03-15 21:56:51
it’s weird !!
mrmmp 2019-03-15 21:57:56
that you can’t get categories right in your view
mrmmp 2019-03-15 21:58:05
have you fixed it ?
mrmmp 2019-03-15 21:59:46
are you using vscode ?
mrmmp 2019-03-15 22:00:28
give me a live link if it’s possible
gathuku 2019-03-15 22:17:37
{{$categories->count(}}
gathuku 2019-03-15 22:18:25
{{$categories->count()}}
gathuku 2019-03-15 22:20:30
But first you need to loop through your values
gathuku 2019-03-15 23:11:49
just try without looping
gathuku 2019-03-15 23:12:02
looping is an alternative
gathuku 2019-03-15 23:12:46
it okay
tonyfrenzy 2019-03-16 03:57:30
Try this:
return (‘inc.search’, compact(‘categories’));
devink0430 2019-03-16 05:08:37
return view(‘inc.search’, compact(‘categories’));

http://php.net/manual/en/function.compact.php

devink0430 2019-03-16 05:12:24
@if @foreach you can change to @forelse ,

like
@forelse ($categories as $category)
<li>{{ $category->name }}</li>
@empty
<p>No categories</p>
@endforelse

https://laravel.com/docs/5.8/blade#loops

Laravel – The PHP Framework For Web ArtisansLaravel
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
EEEN1993 2019-03-16 07:18:16
Can anybody help to get user information after login and display them in json format for API usage?
Testuserid 2019-03-16 08:06:29
devink0430 2019-03-16 05:12:24
@if @foreach you can change to @forelse ,

like
@forelse ($categories as $category)
<li>{{ $category->name }}</li>
@empty
<p>No categories</p>
@endforelse

https://laravel.com/docs/5.8/blade#loops

Great👍

Testuserid 2019-03-16 08:07:22
EEEN1993 2019-03-16 07:18:16
Can anybody help to get user information after login and display them in json format for API usage?

Have you use jwt-auth?

EEEN1993 2019-03-16 08:16:28
Testuserid 2019-03-16 08:07:22
Have you use jwt-auth?

No can you help me with that?

Testuserid 2019-03-16 08:17:19
Sure
Testuserid 2019-03-16 08:17:47
You can follow bitfumes jwt-auth video on youtube.. its awesome
EEEN1993 2019-03-16 08:18:16
Testuserid 2019-03-16 08:17:47
You can follow bitfumes jwt-auth video on youtube.. its awesome

Can you pass me url for that specific video

Testuserid 2019-03-16 08:19:48
https://youtu.be/l201RSQ7Ti4

Laravel with JWT | From Scratch to Exception HandlingYouTube
How to use JWT with Laravel, create login, logout and middleware for JWT.
Exception handling for difference errors for JWT

JWT Explained : https://goo.gl/JSa718

Become My Patron here https://goo.gl/NcvDQh

You can donate any amount via Paypal follow this link https://goo.gl/JhWsKC

Join Our Slack Community – https://goo.gl/pqCjZH

–You May Also Like —

Real Time Chat Series – https://goo.gl/ri42FD

Git ans Github series – https://goo.gl/BXyPxf

Blog with Admin panel Series – https://goo.gl/S5JGyt

Laravel Authentication Series: Multi Auth – https://goo.gl/TyCLlX

Vue Beginner To advanced Series – https://goo.gl/1bjdGg

Sublime Text Best Package Series – https://goo.gl/6phTPP

Laravel Ajax Todo Project – https://goo.gl/p2xTPW

Laravel 5.4 Full Beginner Playlist – https://goo.gl/zpKzhM

Laravel 5.3 Hindi Beginner Tutorials …

Testuserid 2019-03-16 08:25:01
Welcome
Testuserid 2019-03-16 13:27:19
Hello,
Anyone have have use laravel socialite for facebook login, after new rules on facebook app?
andreiikachanov 2019-03-16 19:08:04
Is it possible to somehow read the variable from the .env file in the webpack.config.js file?
Kvn_makwana 2019-03-16 22:43:17
Because you dont have pdo supported sql in your cpanel.
Kvn_makwana 2019-03-16 22:43:18
bnaminen 2019-03-14 07:11:00
I’m looking for PHP and Laravel developers who can work at BANGALORE office. Please forward me profiles

Work from home available?

Kvn_makwana 2019-03-16 22:53:22
andreiikachanov 2019-03-16 19:08:04
Is it possible to somehow read the variable from the .env file in the webpack.config.js file?

You cany access your env vars from webpack.mix

Kvn_makwana 2019-03-16 22:54:25
laravel_discuss-3694.jpg

Kvn_makwana 2019-03-16 22:54:29
Try this one Andreii
andreiikachanov 2019-03-16 22:58:20
Kvn_makwana 2019-03-16 22:54:29
Try this one Andreii

It works, thanks

Kvn_makwana 2019-03-16 23:09:41
Welcome
Hybriddev 2019-03-17 07:00:40
Is there way to show web push
notification on localhost???
dilshod_tursimatov 2019-03-17 07:40:50
Hybriddev 2019-03-17 07:00:40
Is there way to show web push
notification on localhost???

pusher?

ErgashevXurshid 2019-03-17 07:42:22
Hybriddev 2019-03-17 07:00:40
Is there way to show web push
notification on localhost???

socket

ErgashevXurshid 2019-03-17 07:42:40
laravel workerman
Hybriddev 2019-03-17 07:43:52
I use php
Hybriddev 2019-03-17 07:44:18
dilshod_tursimatov 2019-03-17 07:40:50
pusher?

This can help?

ErgashevXurshid 2019-03-17 07:57:06
Hybriddev 2019-03-17 07:43:52
I use php

Google help you

Ahmed Magdi 2019-03-17 20:49:34
Hello guys
I wanna save pdf path in database
I use public path but it save from my c directory, and i want path from public directory!!
Any idea ?
danialld 2019-03-17 21:15:22
How to disable compiling es6 to es5 in laravel mix ?
MEAKA 2019-03-18 02:46:04
Ahmed Magdi 2019-03-17 20:49:34
Hello guys
I wanna save pdf path in database
I use public path but it save from my c directory, and i want path from public directory!!
Any idea ?

For ??

|