Support the ongoing development of Laravel.io →

4,311 Threads

Laravel 5.1 Query Problem

Hi, I have this code: public function clansearch(){ if(((isset($_GET['clanname'])) &&...

0 Likes
4 Replies

hasOne Pivot Relation

Hello, I've a question. I have a database, which looks like this (without unnecessary attributes): U...

0 Likes
0 Replies

Custom pivot table that accepts null values, using attach does not work with null values. Why? How to work around?

Here are my models: class Group extends Eloquent { public function members() { return $...

0 Likes
2 Replies

Stuck on manytomany connection

Hi guys, I was trying to get some work done today, but I got stuck on something. I've got 3 tables:...

0 Likes
2 Replies
Solved

Implementing API operations (CRUD) Showing values for nested resources

Hey guys, I have been wanting to implement fast and easy the index and the show methods for my neste...

0 Likes
0 Replies

Eloquent eager loading: children are missing parent reference (sort of N+1)

Note: this is a crosspost of: http://stackoverflow.com/questions/33674198/laravel-eloquent-eager-loa...

0 Likes
0 Replies
posted 9 years ago

Problem with saving sorted data

Hi, I fetch data from database, then i have to sort it that way: $document->details = $document-...

0 Likes
0 Replies

Getting all from a polymorphic one-to-many relation with eager loading

I have a Favourite Model which will store many different types of favourites (favourite quiz, questi...

0 Likes
0 Replies

Querys to pivot tables

I didn't see in the documentation how to use eloquent for querys in the pivot table. Having: posts...

0 Likes
0 Replies

Lines-Details Table Relationships

Hello, When I need details tables without laravel I use a pk compound column, however I was reading...

0 Likes
1 Replies
Solved
posted 9 years ago

Fillable and guard not working as supposed

Im on Laravel 5.1. I'm manually setting a field on a create model: User::create([...

0 Likes
2 Replies
Solved
posted 9 years ago

Laravel 5 hasManyThrough error

I’m learning a lot about these eloquent relationships but I’m not quite there in my understanding. I...

0 Likes
0 Replies

Has Many Through?

Categories id | title | parent_id Products id | title | category_id The categories table self join...

0 Likes
0 Replies

Troubles with Arrays, Undefined offset: 0

I have a object ($project) in Blade. When I do a {{ var_dump($project) }} I get: object(stdClass)[60...

0 Likes
0 Replies
posted 9 years ago

Serializing Eloquent Model

Hi, I'd like to know if there is a way to serialize an eloquent model so I could, in the future dese...

0 Likes
2 Replies

Database Design Question

I built a simple CRUD app using Laravel that uses a single main table and Laravel's built-in user au...

0 Likes
0 Replies
posted 9 years ago

One to Many driving me crazy!

Hi I’ve followed all the Laravel documentation on relationships but am still having a problem. I hav...

0 Likes
1 Replies

retrieve data from two foreign tables referenced in items table attached to user by pivot table

Maybe with this image I can make myself clear. I have the user table and the owned_items table The o...

0 Likes
5 Replies
posted 9 years ago

Eloquent Updating Database Row

I'm tying to do the following sql with eloquent model: but it does not work ;/ update account set ru...

0 Likes
1 Replies
Solved

Eloquent ORM randomly returning incorrect relationship

I have a Laravel app that powers an ecommerce website with moderate traffic. This website allows peo...

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.