Support the ongoing development of Laravel.io →

4,311 Threads

posted 9 years ago

Relationship functions interchangeable

I'm just wondering why Laravel behave in this manner when it comes to hasMany() relationships in Elo...

0 Likes
2 Replies
Solved

How can I sort data by relations without join?

I have table users and user_language and I create relations for user_language. user_language will ke...

0 Likes
2 Replies

Laravel, Eloquent and a new graph db driver

My team has been investigating graph databases for our new project, and have landed on using OrientD...

0 Likes
3 Replies
posted 9 years ago

Why isn't id available here?

A simple model with a function class crmUser extends Eloquent { protected $table = 'Person';...

0 Likes
1 Replies

fetch all articles with user selected cartegory

Hi. I am new to Laravel. I am using Laravel 5.1 for my current project. I have 4 table. users, categ...

0 Likes
0 Replies

belongsToMany relationship won't return data

I have a user, user_relationship, and term table. I have a belongsToMany function in my User relatio...

0 Likes
2 Replies
Solved

Cascade on delete not working

I have added cascade on delete to foreign keys on my migrations. They are working on mySql in local...

0 Likes
0 Replies

Filtering multiple relationships

Hi, I have the following models and relations: Ads has many-to-many with Cities Ads has many-to-many...

0 Likes
1 Replies

Eloquent query on pivot table of a pivot table

Hello, i am stuck on an eloquent query. I am rewriting an old app based in symfony 1.4 for Laravel 5...

0 Likes
0 Replies

Conditional Nested Eager Loading in Eloquent.

Hi All, I have below mentioned relationship in my L5 App. 1.Quiz -----one to many-----...

0 Likes
5 Replies

Stick in easy one-to-many pivot relation

Hi everyone, I know this has been asked few times before but still i'm stick in it, here are my tabl...

0 Likes
4 Replies
posted 9 years ago

Select certain columns in relation using with()

I'm using L5.1 and I have this relation in my model: public function rma_platform(){ return $this-...

0 Likes
5 Replies
Solved

Array to form

I have database outpu like [{"lessonTypeId":"1"},{"lessonTypeId":"...

0 Likes
2 Replies
posted 9 years ago

Problem with eloquent (transform mysql query)

I wish to build a new website based on my old website. To do that i use Laravel 4 (I cannot use lara...

0 Likes
1 Replies
posted 9 years ago

How can I have the built-in Collection methods "deep copy" a custom collection?

I have extended the basic Eloquent\Collection class as follows: class BoogerCollection extends \Illu...

0 Likes
1 Replies

Laravel query controller support

I have in controller : $lista = Lesson::where('id', $id_less) ->with(['user' => function ($q)...

0 Likes
0 Replies

Laravel sum problem

Hi, i have two table: LECTURES id name 1 Lesson 1 2 Lesson 2 3 Lesson 3 LECT...

0 Likes
3 Replies
Solved

Change query based on variable from URL

All in the interest of learning Laravel and better coding. This is my controller: public function in...

0 Likes
2 Replies
Solved

RESTful api PUT parameters issues

We're building a restful api which in this case is consumed via an Angular frontend. All works well,...

0 Likes
0 Replies

Transactions in Laravel 5

Hi, I have trouble with a transaction. I want to improve a dashboard view in my applicaton. To do so...

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