Support the ongoing development of Laravel.io →

4,606 Threads

Get column of other table in Laravel ORM from self referencing table get N level hierarchy JSON

i have two tables abc and def. i have models of these two tables named respectively Abc and Def. i A...

0 Likes
0 Replies

Eloquent where() statements

I'm trying make a function that returns false if there is no inventory available. I need it to searc...

0 Likes
1 Replies

Bizarre behavior of pagination

This is my controller: public function prontuario_index(){ $Prontuarios = Prontuarios::get(15);...

0 Likes
7 Replies

Performant queries on large data sets

I'm building a REST API for a large data set, and running into a performance issue I'm not sure how...

0 Likes
3 Replies

Error: Using $this when not in object context

Hi, i call this somewhere in the CustomerController(): $results = CustomerModel::getCustomers(); Th...

0 Likes
7 Replies

how to fetch data from database to edit,update in the form using laravel php

I am new to laravel, please guide me in fetching data from database, i am able to show the data on t...

0 Likes
1 Replies

Dynamic "where" on Eloquent Model

Hello, I'm hoping I can get help with a dilema I ran into. I hope it's something simple. I have a me...

0 Likes
4 Replies
Solved

is remember keyword enough for caching paginated query results

Hi all, I have the following query: $posts = Post::where('category_id', '=', $category->id)...

0 Likes
1 Replies

Storing into database a model that contains multiple models which might be of different type.

Hello guys I have this problem. I have a Form that contains several pages (think a multiple step pol...

0 Likes
3 Replies
posted 10 years ago

List of perticular date entries

Hi, How do i list the table values which are stored on today date using the created at

0 Likes
3 Replies
Solved

Search child relationship

I feel this may be a simple question; but I can't, for the life of me, figure this out. I'm relative...

0 Likes
1 Replies
Solved

Multiple relationships to the same table

I am experimenting with using Laravel for a new project and got stuck at the model definition stage....

0 Likes
1 Replies
Solved

Environment variables are not being detected by Laravel Application

I'm trying to deploy my app on google cloud but having some trouble. In my app.yaml i have env_v...

0 Likes
5 Replies

getDates() and getDateFormat() conflict

I am saving created_at and updated_at as Unix timestamp in DB. I have overridden my getDateFormat()...

0 Likes
0 Replies

Combining Eloquent libraries

Hey guys, I'm having a small problem regarding the combination of multiple eloquent based libraries....

0 Likes
0 Replies

Many to Many Polymorphic relationship catch-all method?

Ok so I have a certifications table which can have many employees or materials. Also the employees a...

0 Likes
3 Replies

migration files from existing tables?

Is there a way to create migration files for existing tables quickly?

0 Likes
1 Replies
posted 10 years ago

Check if row exists

Should this work to see if a row does or doesn't exist? $exists = DB::table('roles')->where('nam...

0 Likes
3 Replies
Solved

Get an user who has specific relationships

Hi. I have a user with countries relationship. (hasMany) user_id 1 country_id 1 user_id 1 country_i...

0 Likes
2 Replies
Solved

Many to Many eager loading strange behaviour

Hello all, I've been struggling with a strange behaviour when trying to load partial information fro...

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