mohammadgholeh said:
Possible helps http://laravel.com/docs/eloquent#mass-assignment
Doesn't seem like he is mass assigning values.
@devmark :
What are you trying to achieve with $from->order = $to->order;
?
hello, i wanna change the position.
- id order
- 1 2
- 2 4
- 3 4
- 4 5
- 5 6
expect after:
- id order
- 1 2
- 3 4
- 2 5
- 4 6
- 5 7
$form = id 3
$to = id 2
so first of all, i have to do 'order= order +1' where order >= $to->order then $from->order = $to->order;
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community