Support the ongoing development of Laravel.io →

4,597 Threads

A wrong query containing 3 models

Hi all, I have 3 tables: books, authors, and publishers. Books-authors and authors-publishers have o...

0 Likes
7 Replies

Laravel relationship

I need help writing a query in eloquent from three tables, where fields table, field_value and users...

0 Likes
0 Replies

4.1 to 4.2 update cant return a simple hasmany object from db gives error!

I am simply just doing this $me = \Auth::user(); return $me->program()->get(); GIVES me; Inva...

0 Likes
1 Replies
posted 10 years ago

Migrations and logical view

Hi, into a migrations file, is it possible to define a logical view creation? or just only normal ta...

0 Likes
0 Replies

I have a lot of form fields on my html page, so how can i quickly map each form field name to its corresponding table column, and insert it that way?

I have a lot of form fields on my html page, so how can i quickly map each form field name to its co...

0 Likes
2 Replies

database relationship

hi i have multiple categories and each category has many posts, i want fetch 4 last posts for each c...

0 Likes
0 Replies

Using "has" to query on pivot table (aka join table)

I've seen some threads that are potentially similar (e.g. http://laravel.io/forum/05-01-2014-eloquen...

fakhriahmedoff liked this thread

1 Likes
2 Replies
posted 10 years ago

SQL Query difficult

I can't "translate" the SQL Query below to Laravel, how I can make this? SELECT SUM(transa...

0 Likes
7 Replies
Solved

[Package] Laravel single table inheritance

#What is Laravel Single table inheritance? Laravel Single table inheritance is a Laravel4 package to...

0 Likes
1 Replies

Controllers vs Models relations best practice

Hello, I am making a community site for pet lovers and I am facing a design question. Lets say I hav...

0 Likes
9 Replies
posted 10 years ago

Creating queries that use tables from more than one database

I need to be able to execute mysql queries that utilize tables from more than one database in the sa...

0 Likes
4 Replies

Relationships problem

Hello guys, I'm trying to make a post with comments system but i'm stuck at the part with relationsh...

0 Likes
0 Replies

Injecting queries to models

Hi there, today I was re-doing the structure of my application and I had this problem: 1 table conta...

0 Likes
0 Replies

get the last record in each group

object(Illuminate\Database\Eloquent\Collection)#651 (1) { ["items":protected]=> array(8...

0 Likes
0 Replies

Struggling to clear SQL error.

I am struggling to fix the following SQL error: SQLSTATE[42S22]: Column not found: 1054 Unknown colu...

0 Likes
2 Replies

Redis notification system

I'm looking into using the built in support of Redis in Laravel for a notification system. I'm tryin...

0 Likes
1 Replies

Eloquent Dynamic Where Queries - Database errors

Hello Laravel Community! I'm trying to use a Dynamic Where Query, however it end up throwing a error...

0 Likes
0 Replies

How to optimize the fetch to the morphTo relation

On Laravel "4.1.29", I have several different type of users. Each type of user has it's ow...

0 Likes
0 Replies

please help -- how to parse (use) aggragate query result

I have managed to evaluate the occurances of distinct values of a column via a raw query. The result...

0 Likes
0 Replies

# of occurances of distinct values in a column

Hi all, Suppose I have an orders table and it has a price field. The price values are between 1 and...

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.