app/Http/Controllers/SparePartController.php
/**
     * Download file the specified resource.
     *
     * @param  \App\Models\SparePart  $sparepart
     * @return \Illuminate\Http\Response
     */
Download file the specified resource.
Download file the specified resource .
public function file(SparePart $sparepart)
    {
        try {
    		return response()->download(Storage_path('app/public/berkas/ccr/'.$sparepart->ccr_file));
    	} catch (\Exception $e) {
    		return abort('404');
    	}
    }
public function file ( SparePart $ sparepart ) { try { return response ( ) -> download ( Storage_path ( 'app/public/berkas/ccr/' . $ sparepart -> ccr_file ) ) ; } catch ( \ Exception $ e ) { return abort ( '404' ) ; } }
Download file the specified resource.
Download file the specified resource .