Support the ongoing development of Laravel.io →

4,310 Threads

morphOne relationship issue

Hello, I am having a issue with a morphOne relationship where it is creating new entries rather tha...

0 Likes
1 Replies

Save data with relationship models

Here are my migrations Schema::create('technologicals', function (Blueprint $table) { $...

0 Likes
0 Replies

How can connect two controllers for one view?

i want to display data from two controllers in one view? is possible? please answer me. thanks.

maryam liked this thread

1 Likes
1 Replies

Converting raw sql query to laravel eloquent

Hi everybody, This is my first question to any forum ever, so please excuse me for any mistakes. I a...

0 Likes
1 Replies

Trying to get property of non-object Error

Hello, i have this error ErrorException in f464710e74e7c0526bc0688fb16d954a0df3c98d.php line 10: Try...

0 Likes
6 Replies

Laravel edit Product, set correct selected (with many-to-many)

I have a system where a User has Shops and Shops have Products. Now a Shop can have many Products, a...

0 Likes
0 Replies
posted 7 years ago

eager loading question / issue ?

I've got this : $location = \App\Location::find($location_id)->with('items','items.vendor...

0 Likes
1 Replies
Solved
posted 7 years ago

Shouldn't we make `newPivotQuery` a public method?

The InteractsWithPivotTable trait has public methods such as newPivotStatement and newPivotStatement...

0 Likes
0 Replies

Link users table to stations table via user_stations

I'm totally confused how to do this with eloquent relationships. I think logically I understand how...

0 Likes
0 Replies

Eloquent Count subscribe by day

Hello, I search to count subscriber by day with Eloquent. Have you got the solution with a code? Fri...

0 Likes
0 Replies
posted 10 years ago

Model Update Method

I want to know if I can use this: User::update($id,array( 'username '=>Input::get('username'...

0 Likes
4 Replies
Solved

to make tracing log of all sql statements

Hi, If there is a way in laravel 5.4 to make tracing log of all sql statements? I mean Barryvdh\D...

0 Likes
0 Replies

eloquent relations

I have two tables one is templates and the other is template_images Showing migration of the two tab...

0 Likes
1 Replies
Solved

Laravel mongodb JSON data

DB::connection('mongodb') ->collection('XXXXXXXX') ->get(); [{"_id":{"$oid"...

0 Likes
0 Replies
posted 7 years ago

Eloquent Relation Issue

I have made two table -navigation_groups -navigation_links relations to these tables has also been a...

0 Likes
1 Replies

updateOrCreate problem

Hi, I've just discover this fantastic function. But I have a little problem. I need to update a fiel...

0 Likes
0 Replies

How should I name an Eloquent polymorphic table?

I am using Laravel eloquent to design my database. Eloquent has a naming convention for naming a man...

0 Likes
1 Replies
Solved

Laravel selectRaw returns NULL

Here is my simple query Pin::where('updated_at', '>=', '2015-01-01') ->selectRaw(&...

0 Likes
1 Replies
posted 10 years ago

setting empty field to null

What is the best solutions for setting empty field to null in a model? I don't want to set mutator f...

0 Likes
9 Replies
Solved

Query Builder

Can somebody help me, This My query for My Table $results = DB::table('offer') ->select(DB::r...

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.