Support the ongoing development of Laravel.io →

4,311 Threads

posted 9 years ago

Relationship: User, Order and Billet in same loop (foreach) in the view.

I've 3 models: User Order Billet User: DB: -id ... Model: public function orders() { return $t...

0 Likes
2 Replies

What is the purpose of setting Laravel loaded config while processing a request?

Hi, i am having some trouble trying to change a connection's database key on the fly to let a model...

0 Likes
0 Replies

Eloquent filtering relation

Hello, I'm new on Laravel, and I need some help to build this query. My clients have many contacts,...

0 Likes
2 Replies
Solved

eager loading on polymorphic relation

Hi there. Here is my problem I have an eloquent model called Notification with a polymorphism relati...

0 Likes
6 Replies
posted 9 years ago

polymorphic relationships and laravel - two messaging systems

I am building a specific kind of messaging system. A user can message a user. A user can message a c...

0 Likes
6 Replies
Solved

Globally include User model L5

Yo! I would like to use User::find to every page of my Laravel site, views and controllers. In Larav...

0 Likes
0 Replies

Eloquent query to get posts in the past 24 hours with the most messages

So, I have a situation where users can add posts to a forum and then comment on those posts. What I...

0 Likes
1 Replies
posted 9 years ago

General error: 1215 Cannot add foreign key constraint

Hello, I have this migration file <?php use Illuminate\Database\Migrations\Migration; class Cr...

0 Likes
2 Replies
posted 9 years ago

table join where clause

I'm going through the laravel documentation and practicing table joins and I am trying to join 2 tab...

0 Likes
1 Replies

How do I use Eloquent to "morph to one" or "has one through"

Basically, I'm trying to use the following table structure in Eloquent. I have a polymorphic table t...

0 Likes
0 Replies

Eloquent model reflection over a relation method

Hi, I am having problems to invoke a relationship method on a model over reflection. My models are:...

0 Likes
2 Replies
posted 9 years ago

product categories

Hi,i have an issues with categories, i'm using the Franzose plugins to developed the product and ca...

0 Likes
0 Replies
posted 9 years ago

Polymorphic relation not working

Hi everyone, I am using the polymorphic relations for the first time and encountering a problem. Her...

0 Likes
0 Replies
posted 9 years ago

How can I achieve a "reverse morph relation"?

Hello everyone! I am trying to achieve something like a morph relation but in a different manner. I...

0 Likes
1 Replies

Get a list of records from 2 tables

I've 2 tables 1st Table is: Projects ID Name 2nd Table is: Users ID Name Project_id...

0 Likes
1 Replies

how to pass json to javascript in laravel

Hello, how to pass json to javascript in laravel this value $salename=json_encode($oSales); resua...

0 Likes
1 Replies
posted 9 years ago

Category issues

I have used franzose/ClosureTable to built the product categories, i need to display each one child...

0 Likes
0 Replies

Many-to-many or public

Hi guys, is there a way to make our belongsToMany() method add more relations than described in pivo...

0 Likes
0 Replies

Multi Tenant

I'm just starting out with Lavarel and i could do with a few tips. I'm creating a multi-tenant servi...

0 Likes
4 Replies

Help using insertGetId

I have the following query: Product::create($request->all()); which works absolutely fine but...

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