Support the ongoing development of Laravel.io →

988 Threads

Query Builder Problem (Order by a related Table)

Hi Guys, i have a problem with my table structure and the query builder, as i am not able to build t...

0 Likes
1 Replies
Solved

Why two queries in Relationships, not join ?

When we do a relationship (e.g. One to One): $phone = User::find(1)->phone; there are 2 queries:...

0 Likes
9 Replies
Solved

email validation never fires.

I'm not 100% sure if this is a bug in Ardent or Laravel, but I cannot seem to get the email validati...

0 Likes
3 Replies
Solved

MySQL query with curdate() not working

I'm rewriting a site using Laravel and having problems with queries involving dates. This is a pre-L...

0 Likes
3 Replies
Solved

Eager loading with "limit" not working.

I have two tables news and comments. News can have many comments: //News public function comments()...

0 Likes
1 Replies
Solved

Fills created_at and updated_at on record creation

The timestamps are being filled in both the created_at and updated_at when a record is created in my...

0 Likes
5 Replies
Solved

Describe model table

Hello i was wondering is there an easy way to describe table that corresponds to specific model like...

0 Likes
1 Replies
Solved

Only pulling data from 7 days ago

Hey everyone, I am working on creating a news area for a local organization in my hometown. The basi...

0 Likes
1 Replies
Solved

Cleaning up my controller

Hey guys, I have this working controller, that I would like to clean up if possible, since i am sure...

0 Likes
3 Replies
Solved

Using model scopes gives Method not found

I'm having a bunch of trouble with model scopes. I have one scope that works properly, called direct...

0 Likes
4 Replies
Solved

whereIn error: Prepared statement contains too many placeholders

I have a simple query like this: $userIdLists = Users::whereIn('id', $idList)->select(array('id')...

0 Likes
2 Replies
Solved

Error while reading from array

I'm trying to make simple example of reading data from multiple sources, storing that data in associ...

0 Likes
1 Replies
Solved

mongodb and laravel4

Hello, I would like to know some suggestion about using using mongodb with laravel4. thanks.

0 Likes
1 Replies
Solved

Display 'Category' names of posts

Hi, I have 3 tables in my database listings (id, title) categories (id, name, parent_id) category_l...

0 Likes
1 Replies
Solved

Issue with Grabbing data

$data = array( 'name' => Input::get('name') 'itemCart' => Cart::conte...

0 Likes
1 Replies
Solved

Transaction doesn't rollback in paticular models.

Hi. I'm replacing old system to new laravel based one. There are many Database-Servers and tables, a...

0 Likes
1 Replies
Solved

How to set the Primary Key and Foreign Key to string

I'm not using the auto increment for the id instead i'm using the 32 char unique id. So when i creat...

0 Likes
6 Replies
Solved

Booleans in JSON API

Hey! I'm trying to build a simple json api where some attributes are of type boolean. The problem is...

0 Likes
4 Replies
Solved

Do you need to create a model for your pivot table?

I have a post table and that post may be included in multiple sections so now I have 3 tables: post...

0 Likes
2 Replies
Solved

How to use unix timestamp in eloquent?

I want to use the created_at, updated_at and deleted_at fields with unix timestamp.

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.

© 2024 Laravel.io - All rights reserved.