app/Http/Controllers/LevelController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Level  $level
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Level $level)
    {
        if($level->delete()){
            return redirect()->route('level.index')->with(
                "success","Data berhasil disimpan");
        }else{
            return redirect()->route('level.index')->with(
                "error","Data gagal disimpan");
        }
    }
public function destroy ( Level $ level ) { if ( $ level -> delete ( ) ) { return redirect ( ) -> route ( 'level.index' ) -> with ( " success " , " Data berhasil disimpan " ) ; } else { return redirect ( ) -> route ( 'level.index' ) -> with ( " error " , " Data gagal disimpan " ) ; } }
Remove the specified resource from storage.
Remove the specified resource from storage .