app/Http/Controllers/dashboard/admin/GradesController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Grades  $grades
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Grades $grade)
    {
        try {
            if (!$grade->delete()) $this->status();
            return $this->status('success', 'success deleted classroom');
        } catch (\Exception $error) {
            return $this->status("error", 'Cannot Delete');
        }
    }
public function destroy ( Grades $ grade ) { try { if ( ! $ grade -> delete ( ) ) $ this -> status ( ) ; return $ this -> status ( 'success' , 'success deleted classroom' ) ; } catch ( \ Exception $ error ) { return $ this -> status ( " error " , 'Cannot Delete' ) ; } }
Remove the specified resource from storage.
Remove the specified resource from storage .