Support the ongoing development of →

4,231 Threads

Constrain Eager Loading on Polymorphic Child (5.8)

I've gotten myself in a pickle trying to load records owned by a user with eager loading. I know I c...

0 Likes 0 Replies
4 Dec, 2019 at 03:56

Eloquent Caching does not updated on delete relation of rel`

When Call ->first() which returns record, then call ->delete(), then call ->first() again,...

0 Likes 0 Replies
3 Dec, 2019 at 06:49

Belongs Via Eloquent support

Users Table Schema::create('users', function (Blueprint $table) { $table->bigIncrements('id'); $t...

0 Likes 0 Replies

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
5 Nov, 2019 at 10:27

Laravel import excel data with eloquent relationship

I have to import excel sheet from laravel to database table. Student Table: studentid studentname sp...

1 Likes 0 Replies

Update is not working

The error I got : error pic: error # What I tried this is my table pic: table my form is like : <...

0 Likes 4 Replies

nested eager loading with constraints from the query

I have the following table structure: -projects -id -project_phases -id -project_project_phase...

0 Likes 0 Replies

is it possible to define relationships in Eloquent models of

There are two tables which are in different databases. Let's say one of them is Users and another is...

0 Likes 0 Replies
21 Oct, 2019 at 06:03

Delete duplicates records from large collection

I have a large database table (~1 million records) which I need to purge the duplicate records. The...

0 Likes 0 Replies

I am trying to eager load parameter in eloquent laravel 5.8

I am trying to eager load data from a many-to-many relationship in eloquent laravel 5.8. The below c...

0 Likes 1 Replies

when i use pagination with alias columns i get an error

Schema::create('costs', function ($table) { $table->increments('id'); $table->unsignedInteger(...

0 Likes 0 Replies

class app\model not found

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

0 Likes 2 Replies

Cannot get the model attibute using eager load in Eloquent

Hi, Please refer below link and help me:

0 Likes 0 Replies

[Ask] Laravel[6.2] Query Builder

Dear All, I have query builder : DB::select("select `id`, `user_name`, `user_email`, (select s...

0 Likes 0 Replies

Replacing files in folder & db on update using polymorphic

Hello! I'm in practice mode with Laravel, and I've tried this at least 80 different ways, based on t...

0 Likes 1 Replies

Fake relationships

Hi, Is it possible to create a fake relationship between two models? Let me explain! I have two mode...

0 Likes 2 Replies
9 Oct, 2019 at 02:49

Error when using relation belongsToMany with Eloquent

Laravel Version: 6.1.0 PHP Version: PHP 7.2.19-0ubuntu0.18.04.2 (cli) Database Driver & Version:...

0 Likes 0 Replies

Search multiple options

Hello everyone, I am new to Laravel. I want to create a property search engine. my properties has an...

0 Likes 0 Replies

Laravel OrderBy relationship count without loading models

have an episodes table and an episode_Listen table, which is a One episode to Many listens I want to...

0 Likes 0 Replies
2 Oct, 2019 at 08:22

API using Eloquent ORM - how to create different responses?

Hi, Warning: for fun, I am trying to learn using Laravel. I am not an experienced developer. However...

0 Likes 1 Replies

Thanks to our community

Solutions given in the past year.


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.

© 2021 - All rights reserved.