app/Http/Controllers/CcrController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Ccr  $ccr
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Ccr $ccr)
    {
        $exists = Storage::exists('public/berkas/ccr/'.$ccr->file);
        if ($exists) {
            Storage::delete('public/berkas/ccr/'.$ccr->file);
        }
        $ccr->delete();
        return redirect()->back()->with('success', 'Data C.C.R berhasil dihapus');
    }
public function destroy ( Ccr $ ccr ) { $ exists = Storage :: exists ( 'public/berkas/ccr/' . $ ccr -> file ) ; if ( $ exists ) { Storage :: delete ( 'public/berkas/ccr/' . $ ccr -> file ) ; } $ ccr -> delete ( ) ; return redirect ( ) -> back ( ) -> with ( 'success' , 'Data C.C.R berhasil dihapus' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .