Support the ongoing development of Laravel.io →

4,314 Threads

posted 10 years ago

Error when trying to get Eloquent relation in a loop

I've been wracking my brain for hours on this one. So I've got a products ---> product_images tab...

0 Likes
1 Replies

Laravel Pagination

I use a form to filter all the data. But when i go to page 2 or any other, i get all the data instea...

0 Likes
4 Replies

Efficient way of ranking information from a database.

Hello, I'm fairly new to Laravel, and I'm working on making a leaderboard for a game. I'm wondering...

0 Likes
1 Replies
posted 10 years ago

StdClass to Eloquent

I have a query that return me the result as array of StdClass. How I can converte to Eloquent?

0 Likes
3 Replies
Solved

Can't get accessors to work

In my application I have numerous models, but the ones that are of concern are 'User' and 'Points'....

0 Likes
3 Replies

Get Recent Comments

Hey everyone, i'm pretty sure that my problem is already out there, but i wasn't able to find any so...

0 Likes
1 Replies
Solved

Escaping for injection

I am learning laravel and php but I just need to clarify when it is needed to escape strings. If any...

0 Likes
4 Replies
Solved
posted 10 years ago

Laravel orderBy using eager loading/functions

I have a Posts DB and a likes DB with the following structure: Posts Table: item_id Likes Table: ite...

0 Likes
2 Replies

Migration of databases

Hello Guys, On the database.php file it is possible to define a database(MySQL, sqlsrv, pgsql). If I...

0 Likes
3 Replies
Solved

Checking against multiple groups

Hello, I have Users who can belong to many Groups, and Issues which are assigned to a single Group....

0 Likes
0 Replies

Models for admin and page display

I'm learning Laravel 5. I have a model called Destination. I am querying the database with the model...

0 Likes
0 Replies

Eloquent hasOne best practice Laravel 5.0

Hello, #Laravel 5.0 Standart situations with html_meta table that contains some html meta data for...

0 Likes
5 Replies

eloquent query multiple relations deep

I have 3 models in question. Company, User, Group. I am trying to return all company records whose c...

0 Likes
4 Replies
Solved

Reusing code in Laravel 5

I am learning Laravel and am using Laravel 5. I have some standard reusable functions that I want to...

0 Likes
6 Replies

How to use basic class to render partials, please help

Hi Folks, I have some eloquent code I use throughout my controller to render a view, rather than kee...

0 Likes
1 Replies

Simple Search Engine

Hello, I am developing a simple search engine and I am having troubles with receiving the results co...

0 Likes
1 Replies

Test controller - why eloquent don't strip redundant input in tests (like password_confirmation)

Hey, I am starting with testing and right now I want to test my controller using phpunit. I have suc...

0 Likes
5 Replies

Display threads with order by post (like higher ID)

I'm building forum. But I need help about building the forum display page. <?php $teemad = DB::ta...

0 Likes
1 Replies
posted 10 years ago

How to set array key from column value

Hi! Is there a nice way to set array key by column value? Now I am doing it this way: $myArray = My...

0 Likes
2 Replies

DB + variables naming conventions

Hi everyone I've been searching this for a while, but couldn't find the specific subject So here is...

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

© 2025 Laravel.io - All rights reserved.