Support the ongoing development of Laravel.io →

4,311 Threads

Updating a model with relationship is giving me pain

I have users table and a profiles table structure is: users table has following fields id, name, em...

0 Likes
3 Replies

leftJoin with pagination

Hi! Has anyone here been able to do a leftJoin with pagination? If so what is the correct method? I...

0 Likes
1 Replies
0 Likes
0 Replies

Best way to update user activity

Ho to update user activity? Check if current user is online It is a solution, but update on each pag...

0 Likes
0 Replies

Change attribute value in Eloquent

My example: $photo = Photo::with([ 'owner' => function ($query) { $query...

0 Likes
1 Replies

Get result from chunk

Hi All, I have around 500,000+ records on my database and fetching it using the laravel query builde...

0 Likes
2 Replies

Using multiple Global Scopes on the same Model in Laravel 5.2

Hey All, I have a Quote model with a table column boolean('approved') which I want to use to setup t...

0 Likes
0 Replies

Narrowing by a column of ManyToMany related table

Tables are here. Table | Columns Article | id, [others] Article_Tag | id, article_id, tag_id...

0 Likes
2 Replies

Laravel 5 - pagination query string after slash issue

Hey guys! I have a problem with my Laravel 5 pagination. I use elequent to fetch user + his items wh...

0 Likes
15 Replies
Solved

Don't know how to manage in laravel this database reality

I have this tables: admins places grants Each Admin has 0-N Place. Each Place has 0-N Grant. So we h...

0 Likes
0 Replies

Don't sort Array before find()

I want to do an find([3,5,23]) on a model. But it seems laravel everytime is sorting the array befor...

0 Likes
1 Replies
Solved

json in the view

I have 2 models: "user", "comment". comment have relation to user public functio...

0 Likes
1 Replies

add to select box values from multiple model attribute

I want to dynamically set options to my select box from another model in Laravel. So I want to do so...

0 Likes
0 Replies

Request input

Hello every one, I am creating Rest Api using Laravel and i have some problem regrading Request inpu...

0 Likes
0 Replies

seeding / accessing one-to-many-relationship

I have a problem with seeding a belongsTo-relationship. My code is the following: // the Model Compo...

0 Likes
1 Replies
Solved

Pagination Help

Hi everyone, Recently I just created a variable with a leftjoin it looks a little bit like this: $it...

0 Likes
0 Replies
posted 8 years ago

Help! New to Laravel! Accessing the Model Function using Laravel 5.2

Hi Guys! im new to Laravel. Been tinkering around the Code and Documents on how to call the Model F...

0 Likes
3 Replies

New to Laravel/Eloquent, need help with relational inserts.

So I am new to Laravel but not to LAMP development, I have been doing this since 1999 and I feel tha...

0 Likes
1 Replies

How to set $fillable attributes for another table with hasOne relationship in a Laravel/Ardent model?

Suppose, I have these ardent models class User extends \LaravelBook\Ardent\Ardent { public $aut...

0 Likes
2 Replies
posted 8 years ago

Issue accessing Eloquent relationship model attributes.

I keep getting an error, "Trying to get property of non-object", when trying to access an...

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.