Support the ongoing development of Laravel.io →

988 Threads

foreignKey

Hi im pretty new to laravel so hope you dont mind for my lack of knowledge. here is my code ive crea...

0 Likes
2 Replies
Solved

Polymorphic relationships and resources

Hello I'm not sure how to form this question but I think it boils down to this: I don't know how res...

0 Likes
1 Replies
Solved

Laravel Eloquent - Repetitive IDs in the IN clause when eage

Environnment OS: Windows 11 - WSL2 (Ubuntu 20.04) PHP: 8.1 Stack: Laravel 9.22 | InertiaJS | Vue3 Da...

0 Likes
1 Replies
Solved
posted 1 year ago

How can I get a model and all of its foreign?

Hello, I have the following models: Member Address (belongs to a member) Phone (belongs to a member...

syq246 liked this thread

1 Likes
2 Replies
Solved

HasOneThrough() Relationship Issue

I am having an issue with my hasOneThrough() relationship. When trying to eager load the relationshi...

0 Likes
5 Replies
Solved

Eloquent query builder does not work correct for morph to re

Hi all. I'm using Constraining Eager Loads With Relationship Existence but getting unexpected result...

vanny2000 liked this thread

1 Likes
5 Replies
Solved

Storing and Querying Schedules

Hello Everyone! I'm working on a multi-store system and I would need to store efficently working day...

0 Likes
1 Replies
Solved

Laravel - MorphTo relation sometimes returns null

I have a polymorphic relationship between an Article model and 3 models (Company, Group & User)...

0 Likes
1 Replies
Solved

Changing the morphMap for only some relations

Hello everyone! We are creating a new API to serve from our legacy database. We have a few different...

0 Likes
5 Replies
Solved

Why save method is working but update operation is not?

Need Help:The following is the controller function where I am having trouble. The commented-out code...

0 Likes
8 Replies
Solved

Factories - Create multiple records with a single request

Hello beautiful people, I am currently experimenting with super long running times on a feature that...

0 Likes
3 Replies
Solved
posted 2 years ago

Issue with hasOneThrough and limit of 999 results

Hello everyone, Laravel : v8.83.5 PHP : 7.4.28 MariaDB : 10.3.34-MariaDB I have a very strange error...

0 Likes
1 Replies
Solved

Consultation in Laravel

I'm trying to get the name and id of a certain department using the query: $department = Department:...

0 Likes
2 Replies
Solved

Custom Route Binding when using withTrashed on routes.

I am having a problem with implicit model binding on routes for Soft Deleted Models. When using the...

0 Likes
1 Replies
Solved

How to create a collection referencing multiple relations th

I have an issue that I'm running into and can't seem to find an answer or figure it out myself. So h...

0 Likes
1 Replies
Solved

unable to fetch data from profile class using user class.

=> Illuminate\Database\Eloquent\Collection {#4087...

0 Likes
2 Replies
Solved

Bind parameter on DB::select(DB::raw())

Dear Sir, I have some weird about binding parameter using DB::select(DB::raw()). I had tried to use...

0 Likes
2 Replies
Solved
posted 4 years ago

Recieving MySQL Store Procedure return Value

I can get the returned value of a stored procedure using this code below `DB::select('call generateC...

0 Likes
2 Replies
Solved

how instead call an Eloquent STATIC method from controller

Laravel 6.x the below works… how instead to call an Eloquent Laravel db method??? how instead call a...

0 Likes
5 Replies
Solved

Eloquent relation count problems

Hi, I'm currently having the following problem that $eloquentEntity->relation->count() and $el...

0 Likes
1 Replies
Solved

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.