Support the ongoing development of Laravel.io →

4,314 Threads

How to avoid the to recount this?

Class Channel extends Model { ... ... public function getSubscribersAttribute(){ return $this-&...

0 Likes
1 Replies
posted 9 years ago

Retrieving records through pivot table

I have a User model and a Group model, connected by a pivot table. Users can be in many groups, grou...

0 Likes
2 Replies

Scope in another table

Hello! I'm trying to build a scope to filter banned users. I have two table : One called users: id,...

0 Likes
4 Replies
Solved

Working with timezones doing complex calculations

I have users across many timezones. Everything in the database is stored in UTC, no problem. What I...

0 Likes
3 Replies

Getting a many to many to "back track"

Hi I'm using Laravel 4 I have a section on my site that displays my portfolio, The problem I'm havin...

0 Likes
2 Replies

Laravel + kendo UI ( ui for PHP)

Anybody out there having experience with using Laravel + kendo ui?

0 Likes
0 Replies

Declaration should be compatible - class extend error

Not really sure what I am missing here? The error: exception 'ErrorException' with message 'Declarat...

0 Likes
1 Replies

Eloquent Bitwise Operations Bitmask

Hi, is it possible to do a bitwise Operation in Eloquent like below? field and numer are a 8 Bit Int...

0 Likes
0 Replies
posted 11 years ago

Get ID of model that I just saved

So, I create an object, do the $object->save(); , and now I want to quickly get auto incremented...

0 Likes
4 Replies
Solved
posted 9 years ago

keep one default row in a model?

A row in a table must exist for my application to function. Is there a way to keep that row in the m...

0 Likes
0 Replies

Tell Eloquent to return an array using a column value as key

Hello all! Currently I have an application where I have stored in the database the following columns...

0 Likes
3 Replies
Solved

Auth::check() is not working

I am trying to authenticate users in my Laravel application. I am encountering the following problem...

0 Likes
4 Replies
Solved

How will you implement the reply function of reddit?

In reddit, every reply could have many replies, again and again, a little complex for me, do you hav...

0 Likes
0 Replies

Is this a correct use of polymorphic relationships?

Hey there, I have been trying to create a preferences system for my app to control a number of featu...

0 Likes
1 Replies

Create relationships in create function

Is it possible to save Eloquent relationship before the Model::created event fires? I have tried ove...

0 Likes
1 Replies

Problems with migrations

In Laravel 5.0 I create a new model "php artisan make:model Product" and laravel's creates...

0 Likes
1 Replies
Solved

Global functions

Hey, i need to make some functions availabile everywhere: this means i can call them from a controll...

0 Likes
3 Replies

Relation issue, Model not found

Hey there, I'm having an issue using relation ships in eloquent. Edit:I'm using Laravel 5.1 I keep h...

0 Likes
4 Replies

How would you unit test Eloquent Scope Methods?

Imagine the following model: class Post extends \Illuminate\Database\Eloquent\Model { public functi...

0 Likes
0 Replies
posted 9 years ago

Problem with WhereIn in Eloquent ORM

Hi, Given code is working fine if just try to show the list but when I try to search some data then...

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

© 2025 Laravel.io - All rights reserved.