app/Http/Controllers/Admin/EmployeeController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Employee $employee
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Employee $employee)
    {
        $employee->user->removeRole($employee->user->roles->first());
        $employee->user->companyProfile()->detach($employee->user->company());
        $employee->user->delete();
        $employee->delete();
        return redirect()->route('admin.employees.index')->withSuccess('Employee deleted successfully');
    }
public function destroy ( Employee $ employee ) { $ employee -> user -> removeRole ( $ employee -> user -> roles -> first ( ) ) ; $ employee -> user -> companyProfile ( ) -> detach ( $ employee -> user -> company ( ) ) ; $ employee -> user -> delete ( ) ; $ employee -> delete ( ) ; return redirect ( ) -> route ( 'admin.employees.index' ) -> withSuccess ( 'Employee deleted successfully' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .
//