Support the ongoing development of Laravel.io →

4,311 Threads

Query to inculde belongsTo Model

What is the correct way to grab a record and also include it's relationship data? Example User belon...

0 Likes
1 Replies
Solved

Query progress

Hello, I am looking for any method for progession rate generation during the execution of the query....

0 Likes
3 Replies

Dealing with Huge database

I am having a huge database with millions of records in different tables. It all works fine when I a...

0 Likes
0 Replies

Delete on update

This tables are just for example. Let's say we have two tables: order_items(id int, name string, pri...

0 Likes
0 Replies

Adding custom data to model from table using traits

I have my user model and I have a custom composer package I am working on which creates a custom tab...

0 Likes
0 Replies

[Help] I need help about a relation [Many To Many]

Hello. Im trying to make a website for trades. Every user will post items that he have for items tha...

0 Likes
10 Replies
Solved

Laravel hasMany get one children

Hello guys, i have hasMany relationship between two tables like this: Parameter::where('property_id'...

0 Likes
1 Replies

Complex Queries

I need help with 2 queries. 1 First I am trying to get all Posts for a specific Category, I have a c...

0 Likes
1 Replies
posted 9 years ago

Eloquent - Static/Caching Issue?

I'm new to Laravel, and I'm loving the framework more and more everyday. I've only had one issue, an...

0 Likes
3 Replies

Can't retrieve all values from specific column

How to do with Laravel 5.1 Eloquent to get this: "SELECT cont FROM news" ?

0 Likes
1 Replies
Solved

Related models: First build object hierarchy then save everything in one go

At the moment I am writing a parser for exam result files. There are 3 model classes: Exam, Question...

0 Likes
0 Replies

Revove data after find

I am building a back-end API with Laravel and need some help with a problem. Example I grab all my P...

0 Likes
3 Replies

Extract from array

I am currently converting a Cake app to laravel but ran into a problem and can't seem to find a solu...

0 Likes
0 Replies

Eloquent vs. Raw SQL? Which is really better?

Hello guys, I know this question sounds kind of silly, but let me explain. I (mostly frontend-dev) a...

0 Likes
4 Replies

Random code execution stops when using Eloquent chunk()

I have a method for a scheduled system cleanup that goes through all the files in the "storage&...

0 Likes
1 Replies

Query builder returns a Collection when empty and an array when it's not

How can I validate it? If I use: $res = DB::table('estacaohs') ->whereRaw($sql) -...

0 Likes
1 Replies

Result of query into view with foreach

hi all, i have this query: $marche = DB::table('articolo') ->join('marca', 'articolo.id_marca',...

0 Likes
1 Replies

Count the unique (in terms of two columns) records

Hello, community. Can anybody help me with the count query? I have the pivot table with two fields →...

0 Likes
0 Replies

mutator $this->attributes return 'Undefined index: id'

I'm trying to add an attribute to a model but can't access the model attributes when I call it. Deta...

0 Likes
1 Replies

2012-07-09T19:22:09.1440844Z to Timestamp

I saw this format of datetime on a Json file recently. Having issues to convert this into a timestam...

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