Support the ongoing development of Laravel.io →

4,311 Threads

Deleting relations

Hy everyone, I have a small problem and if anyone here would know the answer to it i would very much...

0 Likes
0 Replies
posted 10 years ago

Fatal error on deleting, but it works

Hello all, I have innormal problem. My code (I'm using Slim): $app->get('/delete/:id', function($...

0 Likes
3 Replies
posted 10 years ago

What kind of relation is this and how do i assign it

I've found myself understanding relations the best with pictures, so insteat of explaining the relat...

0 Likes
4 Replies
Solved

google account login for the first time displays error

Hello! I am trying to login the user with google account in my application. I am having a problem wh...

0 Likes
0 Replies

Cannot add foreign key constraint

Hi ! I'm trying to add some foreign keys to my tables but unfortunately I get an error while inserti...

0 Likes
7 Replies

Mutual Relationship?

How could I go about this? I have a users table and a user_follows table. In the users model I have...

0 Likes
0 Replies

dropdown2 gets populated based on dropdown1

i have 2 tables, categories and subcategories categories is made up of id, and name subcategories is...

0 Likes
10 Replies
Solved

Data Access Layer Design Question

Hello. I am a Laravel newbie and I am trying to create a structure for my application. In the past...

0 Likes
0 Replies

hasManyThrough is really slow

I have Categories that have many Product Groups and those Product Groups have many Products. I'm usi...

0 Likes
7 Replies
Solved

Eloqent query if input is empty ( good approach? )

Hello, I'm building search for my worker table with eloqent, and for example I have two fields : $fi...

0 Likes
1 Replies

Fillable and guarded, when to use which

I know what each one does, fillable being a whitelist of columns/attributes that I was to explicitly...

0 Likes
3 Replies
Solved

Use our own classes

Hi. We have a web application, and its frontend is not using Laravel yet because it started some yea...

0 Likes
1 Replies

Query Builder query using Eloquent syntax

Greetings to community! I want to get help from Eloquent masters. I have a Query Builder query: $cit...

0 Likes
3 Replies
posted 10 years ago

filter collection with children

$categories = Category::with(['posts'=> function($query) { $query->take(4); }])->get() $...

0 Likes
5 Replies

Eager Loading - "first()" vs. dynamic properties

Hello! Am right about the following behaviour? (I am using Laravel 4.1) When having a simple one to...

quyle92 liked this thread

1 Likes
4 Replies
Solved

Custom Pivot Model - Doing belongsToMany uses parent model id, NOT pivot model id

I have a Product model, an Option model, and a ProductOptionPivot model. A collection of Option mode...

0 Likes
6 Replies
Solved

Group by pagination without performance issues when there is over 15K results.

Laravel Eloquent query builder suffers grouping by a column and counting the results for the paginat...

0 Likes
3 Replies
posted 10 years ago

Make Multiple Eloquent Relationship & there's A Where Clause

Now I have news category,news, and news image table structure like this and i want to make a list l...

0 Likes
1 Replies

Polymorphic Relationships and whereHas not working

Hi Guys, So firstly here is some code ... http://laravel.io/bin/Ld6Gx So I have a user model, and th...

0 Likes
3 Replies

Paging on views with relationships

I have this in views and work fine (show only first five): @foreach ( $tema->posts()->paginate...

0 Likes
4 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.