public function order()
	{
		$Model   = App::make($this->Model);
		$orders  = Input::get('orders');
		$objects = $Model::whereIn('id', array_keys($orders))->get();

		foreach ($objects as $object) {
			$object->order = $orders[$object->id];
			$object->save();
		}

		return 1;
	}
public function order()
	{
		$Model   = App::make($this->Model);
		$orders  = Input::get('orders');
		$objects = $Model::whereIn('id', array_keys($orders))->get();

		foreach ($objects as $object) {
			$object->order = $orders[$object->id];
			$object->save();
		}

		return 1;
	}
public function order ( ) { $ Model = App :: make ( $ this -> Model ) ; $ orders = Input :: get ( 'orders' ) ; $ objects = $ Model :: whereIn ( 'id' , array_keys ( $ orders ) ) -> get ( ) ; foreach ( $ objects as $ object ) { $ object -> order = $ orders [ $ object -> id ] ; $ object -> save ( ) ; } return 1 ; }
AJAX for reordering objects.
AJAX for reordering objects .