Support the ongoing development of Laravel.io →

4,311 Threads

last 3 comments of each post using hasMany

$posts=Post::with(['comment' => function($query) { $query->orderBy('created_at', 'desc'); $que...

0 Likes
0 Replies

Helper Function not working in configuration file

Hi, I am trying to use my helper function from services.php file. But it dose not work for me. If i...

0 Likes
0 Replies

5.1 Model Method access in views

I have a model with a getURL() method. when I query and return a list of models which I pass to my v...

0 Likes
0 Replies

Relationships problem in Eloquent

Hello all, I'm struggling with the following problem. I have three tables - Users, Groups and Roles....

0 Likes
4 Replies

Problems with generic Model

I'm trying to make a generic model for all tables. But I have a strange problem. If I try this: $thi...

0 Likes
0 Replies

Search Relationship -> Search returns too many results

Hello all, I have two models which are related. I am trying to do a search in Products and only disp...

0 Likes
1 Replies

[Clarification] About multilevel transactions behaviour in Eloquent

When I do: DB::beginTransaction(); //T1 Device::insert(array("submit_hash" => "tri...

0 Likes
1 Replies
posted 10 years ago

Neo4J Eloquent Driver

A promising Eloquent Driver for Graph Databases is in the works: https://github.com/Vinelab/NeoEloqu...

0 Likes
1 Replies

created_at and updated_at timestamp value differ from each other

The two timestamps have different values regarding of timezone config. After inserting and loging in...

0 Likes
1 Replies
Solved

Query to join tables and produce a list

This sounds like it should be a pretty simple thing to do but I'm trying to wrap my brain around it...

0 Likes
0 Replies

Difference between SELECT on db-table and db-view on webhosting, error 1615

On webhosting in MySQL I have created in database set of db-tables and couple of db-views. Everythin...

0 Likes
0 Replies

Populating Database - one to many relationship

I have a one-to-many relationship that is not working. A 'Client' has many 'Athletes'. I have alread...

0 Likes
3 Replies
posted 9 years ago

Factories for Previews

I am creating a Lease Preview for Printing for our Rental company and I'd like to be able to provide...

0 Likes
2 Replies

Laravel connect to IBM db2

All, I just started using laravel and want to connect to an existing ibm db2 database with uppercase...

0 Likes
4 Replies
posted 9 years ago

Observers for Pivot Model

Hello, I'm trying to set up an Observer for a pivot model, but I've got an error. User model public...

0 Likes
1 Replies

Laravel 5.1 Manual Pagination not working as expected

I am having issues when creating my own paginator that the same collection of rows is always returns...

0 Likes
4 Replies

Changing dateformat on select

HI I have a DATE mysql column and i wish to change the stored format from YYYY-MM-DD to dd-mm-yyyy w...

0 Likes
0 Replies

Strange "email" form item behaviour

This is happening in L5.1 with a "user" eloquent model, and only for the "email"...

0 Likes
2 Replies

Get date from timestamp in laravel

How can I get date from "2015-07-31 06:03:21" using Laravel query builder? In normal query...

0 Likes
2 Replies

dynamically adding class works? but ultimately hangs app

i am writing a generic database browse/update so i have to create a new class for each table i want...

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.