app/Http/Controllers/Backend/BackendCategoryController.php
/**
     * Remove the specified resource from storage.
     * We retrieve the user choose about how manage sub folder and posts
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
We retrieve the user choose about how manage sub folder and posts

@param  int  $id
@return \Illuminate\Http\Response
Remove the specified resource from storage . We retrieve the user choose about how manage sub folder and posts @param int $id @return \ Illuminate \ Http \ Response
public function destroy(Request $request, $id)
    {
        $input_data = $request->all();
        if(intval($input_data['delete_option'])>0){
            switch ($input_data['delete_option']){
                case 1 : $result = $this->categories->deleteCategoryAndSubcategory($id);
                         break;
                case 2 : $result = $this->categories->moveSubcategory($id,$input_data['move_in_id_category']);
                          break;
                case 3 :  $result = $this->categories->movePostsToCategory($id, $input_data['new_id_category']);
                         break;
            }
        }
        if($result){
            \Session::flash('flash_message_success', 'Success! Category deleted.');
        }else{
            \Session::flash('flash_message_error', 'Error! Category Not deleted.');
        }
        return redirect()->route('categories.index');
    }
public function destroy ( Request $ request , $ id ) { $ input_data = $ request -> all ( ) ; if ( intval ( $ input_data [ 'delete_option' ] ) > 0 ) { switch ( $ input_data [ 'delete_option' ] ) { case 1 : $ result = $ this -> categories -> deleteCategoryAndSubcategory ( $ id ) ; break ; case 2 : $ result = $ this -> categories -> moveSubcategory ( $ id , $ input_data [ 'move_in_id_category' ] ) ; break ; case 3 : $ result = $ this -> categories -> movePostsToCategory ( $ id , $ input_data [ 'new_id_category' ] ) ; break ; } } if ( $ result ) { \ Session :: flash ( 'flash_message_success' , 'Success! Category deleted.' ) ; } else { \ Session :: flash ( 'flash_message_error' , 'Error! Category Not deleted.' ) ; } return redirect ( ) -> route ( 'categories.index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .
//Recovery input data