Support the ongoing development of Laravel.io →

984 Threads

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

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

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

Sql Server Date format issue

Hello, First of all I'd like to say that I have no other choice but using SQL Server ( and IIS as we...

0 Likes 6 Replies
Solved

Manage Collection of Model Objects

I'm trying to make my notifications for Laravel 6 mail out effectively. I have a model (Event) that...

0 Likes 1 Replies
Solved

class app\model not found

showing the error: Symfony\Component\Debug\Exception\FatalThrowableError Class 'app\Modo' not found...

0 Likes 2 Replies
Solved

Detach Pivot with 3 keys

It has the following tables: companies, addresses and company_address. I want to remove a record fro...

0 Likes 4 Replies
Solved

Eloquent result different from MySQL result

Hi all. I have 3 tables in Laravel: doctors, clinics and clinic_doctors. Doctors have relation: publ...

0 Likes 1 Replies
Solved

'orWhere' not work eloquent model relationship

Laravel Version: 5.7.25 PHP Version: 7.2.14 Database Driver & Version: MySQL 2ª gen. 5.7 We ar...

0 Likes 1 Replies
Solved

Laravel 5.7: User-tables in other database

Hi, In my Laravel project, my users-table and password_resets-table are located in the database Inte...

0 Likes 2 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?

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

© 2022 Laravel.io - All rights reserved.