private function seedSavedFiles() { $file = new GDriveFile(); $file->id = static::SEED_FILE_ID; $file->name = 'Seed file'; $file->user_id = $this->user->id; $file->save(); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $file = GDriveFile::findOrFail($id); $this->authorize('destroy', $file); $file->delete(); return redirect('gdrive')->with('status', 'File has been un-saved'); }