private function saveUploads(Request $request, $fileUrl, $id) { $file = new File(); $file->file_name = $request->file('file_name')->getClientOriginalName(); $file->file_url = $fileUrl; $file->project_id = $id; $file->save(); }
public function getFiles($id) { $files = File::project($id)->get(); return $files; }