Support the ongoing development of Laravel.io →

4,313 Threads

Convert an array of integer onto a Collection ... before map

I created this method : public function vcListAndSegmentCount() { $valuechainLists = Valuechain::sel...

0 Likes
0 Replies

Join interfering with eager loading

I'm going insane. I have a query that needs to use a join and eager loading. The join needs to occur...

0 Likes
2 Replies

Has many through update / with pivot laravel 5.5

I have several tables (all of them with softdeletes and timestamps : created_at , updated_at , delet...

0 Likes
0 Replies

Eloquent Relationships

I have two models MediaProfile and MediaProfilesContent. MediaProfile has many MediaProfilesContent...

0 Likes
8 Replies
Solved
posted 6 years ago

If a model is not persisted always thown an Exception?

When i create a model, for example with the Model::create() method its necesary to check if the mode...

0 Likes
0 Replies

Eloquent ORM: Eager Loading Error: 'Call to a member function addEagerConstraints() on a non-object'

Unit Model: namespace App\Models\Qualification; use Illuminate\Database\Eloquent\Model; class Unit...

0 Likes
2 Replies
Solved

Query bulding.

Hello, I started to learn Laravel and I have a problem. I want to query questions from the database...

0 Likes
0 Replies

Laravel Bootstrap SlideShow each slider eight product

I want each slideer has eight products <div class="carousel-inner hidden-xs" role="listbox">...

0 Likes
0 Replies
posted 6 years ago

Fetching and Displaying Customer Orders on Page

There are 3 tables. First one is orders: After example order: class Order extends Model { // Tab...

0 Likes
0 Replies
posted 6 years ago

SQL result != Eloquent result

$data = StoneType::with(['user'=>function($query){ // 每个取 2 条 return $query-&...

0 Likes
0 Replies

Methods of Eloquent not working

Hey! I have a problem with my application. Some methods of eloquent not working. When I use method f...

0 Likes
0 Replies

Laravel 5.2 Eloquent relationship with two (composite) keys

I'm trying to figure out the best way to define a relationship from one model to another where the r...

0 Likes
3 Replies

Enforce additional WHERE on all queries.

We have a product SaaS let's say eCommerce. All user created shops and products are stored in single...

0 Likes
4 Replies
posted 10 years ago

Search Encrypted Data

Is there any way to search encrypted data? I have tried as below, but always end up as record not fo...

0 Likes
9 Replies
Solved
posted 6 years ago

what is relation used for, examples

Hi, public function belongsToMany($related, $table = null, $foreignKey = null, $relatedKey = null, $...

0 Likes
0 Replies
posted 6 years ago

Change pivot column from id to email

Hi, For a model I need to use an email value instead of the user_id value Normaly you would do it li...

0 Likes
0 Replies
posted 9 years ago

Eloquent relationship joining on multiple fields

I have a table that's got: tableA.id, tableA.related_id, tableA.sort_date [and other fields irreleva...

0 Likes
1 Replies

Trying to get property of non-object

l am getting the error above when trying to get the merchant at a particular user id. Here is my vie...

0 Likes
15 Replies

Randomize Laravel table rows to be unique

I have an app that has Categories, Boards, and Pins Models. A category has many boards and has many...

0 Likes
2 Replies

How to group relationship and get rank

Basically I have a point log table as follows: user_id | points 1 | 10 2 | 20 1 |...

0 Likes
0 Replies

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.