app/Http/Controllers/Admin/RoleController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Role  $role
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy($id)
    {
        try{
            $role = Role::find($id);
            $role->delete();
            return redirect()->action(
                'Admin\RoleController@index' 
            )->with('success', 'Role has been deleted.');
        } catch(\Illuminate\Database\QueryException $ex){ 
            return redirect()->action(
                'Admin\RoleController@index' 
            )->with('failed', 'Unable to delete, this ROLE has linked record(s) in system.');
        }
    }
public function destroy ( $ id ) { try { $ role = Role :: find ( $ id ) ; $ role -> delete ( ) ; return redirect ( ) -> action ( 'Admin\RoleController@index' ) -> with ( 'success' , 'Role has been deleted.' ) ; } catch ( \ Illuminate \ Database \ QueryException $ ex ) { return redirect ( ) -> action ( 'Admin\RoleController@index' ) -> with ( 'failed' , 'Unable to delete, this ROLE has linked record(s) in system.' ) ; } }
Remove the specified resource from storage.
Remove the specified resource from storage .