Support the ongoing development of Laravel.io →

4,311 Threads

New to Eloquent, but can't make this simple relationship work!

SOLVED My mistake, I mixed up the model relationships :) Hi guys, I'm new Eloquent (usually use raw...

0 Likes
1 Replies
posted 10 years ago

Querying a polymorphic relation for more info

Modified from: http://laravel.com/docs/master/eloquent#polymorphic-relations class Photo extends Elo...

0 Likes
1 Replies

How to mock eloquent models

Hi, I have service classes that retrieves Eloquent models using a repository and performs some opera...

0 Likes
0 Replies

File upload through ajax in laravel

I am doing ajax call on click of submit button. then that call goes to controller. In controller i w...

0 Likes
2 Replies

Eloquent Query takes long time

Hi, I am trying to fetch ALL rows from a table in my dB. I need to get all rows because the data is...

0 Likes
1 Replies

Having trouble updating a one-to-one relationship through PUT request

Hi everyone. I'm a junior dev at an agency building a site for a client with Laravel and Angular tha...

0 Likes
0 Replies

Login as guest instead of User

In my AuthenticatedsUsers.php, the postLogin() method correctly run the Auth::attempt() and return t...

0 Likes
1 Replies
Solved

Call to undefined method Illuminate\Database\Query\Builder

I've got two models: <?php namespace blog; class Posts extends \Eloquent { /** * The databas...

0 Likes
5 Replies
Solved

One to One: Inverse relationship not working

I have two models Groups and Roles, i can fetch the groups of a role, but if i try to fetch de roles...

0 Likes
3 Replies
Solved

Override default json data name

Hey, I'm wondering if there's a quick way of over-riding the data array in a json reponse. For examp...

0 Likes
0 Replies
posted 9 years ago

Help with query in Eloquent

Hi guys!! I need to do this query on eloquent: Select * from my_table where field_a + field_b in (2,...

0 Likes
1 Replies

How to create client-config driven api

So I am creating an API but it has some caveats. First off I have to be able to easily create models...

0 Likes
0 Replies

Pivot Table Extra Field

What I’m trying to do is when a new candidate is created an extra field is automatically populated i...

0 Likes
1 Replies
Solved

How to input multiple rows (hasMany relationship) simultaneously in single post form

Hi, I try to make a sms-gateway app and my problem like 'broadcast' feature. What is that? Here we g...

0 Likes
0 Replies

Any good practice of using multiple Eloquent instances to update the same row?

Hi all, As the following example, we create two Eloquent instances to fetch/update the same db row....

0 Likes
0 Replies

Overriding a construct in a Model class

I've been struggling as to why my "create" method was not saving as a mass assignment. Myt...

0 Likes
0 Replies

Multiple database connection to transfer data?

I have 2 mysql databases, I try to get data from source and transfer it target, also delete current...

0 Likes
3 Replies
Solved
posted 9 years ago

Problem with Cart

Have been struggling with some issues with carting service. Have been trying to integrate and replac...

0 Likes
0 Replies

How do I remove redundant index keyed results from JSON response?

I'm creating an API that dumps out query results to a json response in Lumen: $result = DB::select('...

0 Likes
2 Replies

How to fire an event after successfull password reset?

Hello folks! How can I fire an event after one of my users successfully resets their account passwor...

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.