public function sortItemConditions(Request $request)
    {
        $this->validate(
            $request,
            [
                'item_conditions' => 'required|array',
            ]
        );

        foreach ($request->input('item_conditions') as $item_condition_id => $sort) {
            $item_condition = ItemCondition::find($item_condition_id);

            $item_condition->sort = $sort;

            $item_condition->save();
        }

        return redirect()->back()->withStatus(trans('mustard::admin.item_conditions_sorted'));
    }
public function sortItemConditions(Request $request)
    {
        $this->validate(
            $request,
            [
                'item_conditions' => 'required|array',
            ]
        );

        foreach ($request->input('item_conditions') as $item_condition_id => $sort) {
            $item_condition = ItemCondition::find($item_condition_id);

            $item_condition->sort = $sort;

            $item_condition->save();
        }

        return redirect()->back()->withStatus(trans('mustard::admin.item_conditions_sorted'));
    }
public function sortItemConditions ( Request $ request ) { $ this -> validate ( $ request , [ 'item_conditions' => 'required|array' , ] ) ; foreach ( $ request -> input ( 'item_conditions' ) as $ item_condition_id => $ sort ) { $ item_condition = ItemCondition :: find ( $ item_condition_id ) ; $ item_condition -> sort = $ sort ; $ item_condition -> save ( ) ; } return redirect ( ) -> back ( ) -> withStatus ( trans ( 'mustard::admin.item_conditions_sorted' ) ) ; }
Sort item conditions.

@return \Illuminate\Http\RedirectResponse
Sort item conditions .