Support the ongoing development of Laravel.io →

4,302 Threads

Capture Model old data before committing updated data to database

Hi, We have a requirement in our application wherein we need to capture all instance of update opera...

0 Likes
1 Replies

Array on One Column (Join)

DB::table('users') ->join('contacts', 'users.id', '=', 'contacts.user_id') ->join('orders', 'u...

0 Likes
1 Replies

getting id from a join

i have this join statement : Item::join('buttons', 'items.cta_id','=','buttons.id')->where('build...

0 Likes
2 Replies
Solved

Getting Call to undefined method, while pulling records from a model.

I must be missing something obvious here... I have a model called PlanType and another called Pricin...

0 Likes
2 Replies
Solved
posted 10 years ago

Manager/User relationship

Hi, I have set up my site so that a User can have a Role by doing: class User... public function...

0 Likes
1 Replies
posted 10 years ago

Getting orderby in conversation

How do I achieve to order my conversation by latest messages. I got this so far but it's not working...

0 Likes
1 Replies

Opinion on getReceiver

Would you do // Model public function getReceiver() { return $this->users()->where('user_i...

0 Likes
0 Replies

Baum Nested Set Retrieve all tree with relation

Hi, I have Category model based on Baum Nested Set (https://github.com/etrepat/baum) package and Cat...

0 Likes
2 Replies
Solved
posted 10 years ago

Will a touched object have the same timestamps as the toucher?

I have a similar example to that in the docs.. a comment and post scenario. I want notifications whe...

0 Likes
0 Replies

Laravel Validate Many-To-Many Relationship

So I have this Offer model with several offers available. I also have a Pattern model that has a man...

0 Likes
0 Replies

Laravel import thousand of records from csv file?

I have a csv file with thousand of records. How can I use Eloquent model to import all data?

0 Likes
2 Replies
Solved

Displaying content with html tags.

Hi , I am using ckeditor for textarea. It is working fine. But when we display description on fronte...

0 Likes
2 Replies

Eloquent Mutator + DB::raw

This Setter works well... public function setPoligonoAttribute($value) { $this->attributes['polig...

0 Likes
3 Replies
Solved
posted 10 years ago

Get latest row of table in model.

I got the following code and want the latest result. // Model public function getProfilePic() {...

0 Likes
1 Replies
Solved

Howto handle exceptions that occur when database is disconnected or unreachable?

I am in the process of writing a SPA application using angularjs for the frontend and laravel as a R...

0 Likes
0 Replies

Permissions - only show deep nested content in users group?

Once again I'm pretty lost, the same place as other projects I've started xD A "closed" ap...

0 Likes
3 Replies
posted 10 years ago

Showing models only through relation

What is the best way to use findOrFail / find on a model to find models just belonging to an user. M...

0 Likes
2 Replies

Three table relationship problem in view: Product, producimages, imagetypes. How to show images by type in specific section in view. Not all images.

Hello, can anyone help me with my problem. I can't seem to solve it. I want to show in blade view im...

0 Likes
2 Replies
Solved

How do you create a model relationship base on a column value?

Hi guys! I have a comments table and this table has four fields which are : id post_id type_id comm...

0 Likes
1 Replies
Solved

Possible to use PHP functions in-line with Eloquent ->where clause?

Hi, I've got this in my code. $list = $the_things->where( 'date_field', '>', time() ); That d...

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.