I have 3 table please tell me how to get data in user controller as defined bellow?

|
TecherrorNR9 2021-01-18 10:43:39
segungreat 2021-01-18 10:41:32
What’s the problem

laravel_discuss-66895.jpg

segungreat 2021-01-18 10:45:15
TecherrorNR9 2021-01-18 10:43:39

May be you are missing a closing curly bracket, show your full code

absoluthalal 2021-01-18 10:58:53
#ASK
How to create multiple tables on one view with yajra DataTables?
absoluthalal 2021-01-18 11:01:13
absoluthalal 2021-01-18 10:58:53
#ASK
How to create multiple tables on one view with yajra DataTables?

laravel_discuss-66901.jpg

absoluthalal 2021-01-18 11:01:40
absoluthalal 2021-01-18 11:01:13

I want to create multiple datatables in this view

Phen 2021-01-18 11:12:42
segungreat 2021-01-18 10:42:29
What’s the problem?

Example: when one user order, I query existing item whether it sold out or not then process order, but at the same time another user request order too and do the same way. But actually, the available item is only one, but they do at the same time when we check item sold out having problem

M.A 2021-01-18 11:28:12
Hey
I have multi records (in array)
How can I insert them in database?
I need the all data id in next process
insert method will return a bool
Also foreach will be slow for this data
pravin575 2021-01-18 12:29:54
What is laravel mix used for?
geohad 2021-01-18 14:07:30
Hi who is the best editor for laravel ?
2021-01-18 14:09:59
geohad 2021-01-18 14:07:30
Hi who is the best editor for laravel ?

Php storm

Vishal Singh 2021-01-18 14:34:24
Any one have laravel with vue course….
naveen5566 2021-01-18 14:37:10
how to conect laravel with socket.io?
naveen5566 2021-01-18 14:37:22
Any example
segungreat 2021-01-18 14:40:42
Phen 2021-01-18 11:12:42
Example: when one user order, I query existing item whether it sold out or not then process order, but at the same time another user request order too and do the same way. But actually, the available item is only one, but they do at the same time when we check item sold out having problem

Waooo, I haven’t experience something like this.

segungreat 2021-01-18 14:42:14
pravin575 2021-01-18 12:29:54
What is laravel mix used for?

For frontend or SPA compilation. Makes is easy to use with laravel. I think that’s what the documentation says

segungreat 2021-01-18 14:43:10
Phen 2021-01-18 11:12:42
Example: when one user order, I query existing item whether it sold out or not then process order, but at the same time another user request order too and do the same way. But actually, the available item is only one, but they do at the same time when we check item sold out having problem

Are you testing on production with user from different devices or local

mauvil 2021-01-18 14:57:12
Stan 2021-01-18 01:03:38
That is the limitation. You don’t always need to use models, build your custom models

Do you think it would be crazy to try to modify Eloquent to remove quotations?

DesolatorMagno 2021-01-18 15:01:09
Yes.
DesolatorMagno 2021-01-18 15:01:42
Never modify directly, extend and them modify.
pravin575 2021-01-18 15:06:40
How to increase page speed for laravel project
2021-01-18 15:25:50
I have a table:

products:
-id
-title
-description

categorys:
-id
-parent
-name

product_categorys:
-product_id
-category_id

In the category I use multi level (parent,child).

I want to display data by category.
If I select a category with a level above it, then all product data in the derived categories are all displayed

veddishant 2021-01-18 19:32:05
Hello! Devs,
I have 3 table please tell me how to get data in user controller as defined bellow ??
Following models are there

1) User Model
public function user_detail()
{
return $this->hasOne(UserDetail::class);
}
2) UserDetail Model
public function user()
{
$this->belongsTo(User::class);
}
public function city()
{
$this->belongsTo(City::class);
}
3) City Model
public function user_detail()
{
return $this->hasOne(UserDetail::class);
}

4) User Controller
public function index(Request $request)
{
$user = User::with([‘user_detail’,’city’])->findorfail($request->user()->id); // without city i m getting bellow response.
return $user;
}
response :
{
“id”: 1,
“first_name”: “John”,
….
“user_detail”:{
“id”:43,
“user_id”:1,
“city”:231, // instead this i want city object here with id,name
“extra_fields”:”random value”
}
}

DesolatorMagno 2021-01-18 19:34:44
City is not related directly to user so you can’t call it directly, try ‘user_detail.city’
Kerry Kerry 2021-01-18 19:36:12
How can I be able to understand laravel events well
Kerry Kerry 2021-01-18 19:36:41
I mean laravel 8
Kerry Kerry 2021-01-18 19:36:51
events
rebory 2021-01-18 20:22:12
Laravel8 not very friendly but old versions are good and friendly
RezaAmini_ir 2021-01-18 20:22:58
rebory 2021-01-18 20:22:12
Laravel8 not very friendly but old versions are good and friendly

Why do u say this ?

DesolatorMagno 2021-01-18 20:30:21
You can still instal UI and you don’t need to use Jetstream, you can even install fortify by itself and there is a package for UI fortify.
natghi2010 2021-01-18 20:33:39
RezaAmini_ir 2021-01-18 20:22:58
Why do u say this ?

I reflect this sentiment

natghi2010 2021-01-18 20:34:15
Idk why but laravel 8 seems
natghi2010 2021-01-18 20:34:36
Like a distaster
RezaAmini_ir 2021-01-18 20:34:52
DesolatorMagno 2021-01-18 20:30:21
You can still instal UI and you don’t need to use Jetstream, you can even install fortify by itself and there is a package for UI fortify.

++
Most of Laravel developers think they have lost Laravel/UI in 8 Version

bee_amour 2021-01-18 20:34:58
laravel_discuss-66942.jpg

natghi2010 2021-01-18 20:35:25
Do you know how many plugins fail in laravel 8?
|