Example #1
0
 public function fileSave()
 {
     if (\Request::ajax()) {
         //  if (Input::hasFile('file')) {
         $project_id = Input::input('postprojectid');
         $file_description = Input::input('file_description');
         $file_id = Input::input('file_id');
         $pro_file = ProjectFiles::where('id', '=', $file_id);
         $new_project_file = array("file_des" => $file_description);
         // project  ανοιχτο
         $pro_file->update($new_project_file);
         //            $file = Input::file('file');
         //            $project_id = Input::input('file-project-id');
         //            $name = $file->getClientOriginalName();
         //            $file->move(
         //                base_path() . '/public/projectfiles/', $project_id.'_'.$name
         //            );
         //
         //            $project_files= new ProjectFiles();
         //            $project_files->file_name = $name;
         //            $project_files->file_path = base_path() . '/public/projectfiles/'. $project_id.'_'.$name;
         //            $project_files->project_id = $project_id;
         //
         //            $project_files->save();
         //  $project->filepath = base_path() . '/public/projectfiles/' . $fileName;
         // $project->save();
         //    };
         echo json_encode(array('pro_file' => $pro_file));
     }
 }