Support the ongoing development of Laravel.io →

CleverCookie

Joined 2 Jul 2014

Statistics

Threads 0
Replies 25
Solutions 1
Articles 0

clevercookie has not posted any threads yet

replied 10 years ago

How do I mass replace a column value using Eloquent in Laravel 4?

Using eloquent: User::where('votes', 1)->update(array('votes' => 10));

0 Likes
replied 10 years ago

How do I mass replace a column value using Eloquent in Laravel 4?

DB::table('users') ->where('votes', 1) ->update(array('votes' => 10...

0 Likes
replied 10 years ago

eloquent has with where on pivot?

Try this. $users = User::with('services') ->whereHas('services', function($q)...

0 Likes
replied 10 years ago

Pivot Tables

all you need is a role_id on your users table. Then just do the echo I previously posted $users = Us...

0 Likes
replied 10 years ago

Pivot Tables

//role model public function users() { return $this->hasMany('User'); // this will get all...

0 Likes

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.