Пример #1
0
 public static function getFullProjectData($projID)
 {
     $myProject = collect();
     $currentProject = \App\Project::getPojectById($projID);
     $owner = \App\Project::getProjectAuthor($currentProject->id);
     $tags = \App\Project::getProjectTags($currentProject->meta_keys);
     $gender = \App\Project::getProjectGenders($currentProject->id);
     //$materials = \App\Project::getProjectMaterials($currentProject->id);
     $knobColor = \App\Project::percent2Color($currentProject->progress);
     $steps = \App\Project::getTutorialStepByProjectId($currentProject->id);
     $serie = \App\Project::getProjectSerie($currentProject->id);
     $documents = \App\Project::getProjectDocuments($currentProject->id);
     $media = \App\Project::getProjectMedia($currentProject->id);
     $currentProject->fullname = $currentProject->name;
     $currentProject->name = str_limit($currentProject->name, $limit = 35, $end = '...');
     $currentProject->knobColor = $knobColor;
     $currentProject->directory = "/img/cd-" . $currentProject->slug . "-12345678/";
     $currentProject->category = \App\MacroCategory::getCurrentMacroCategoryById($currentProject->macro_category_id);
     $currentProject->serie = $serie;
     $currentProject->tags = $tags;
     $currentProject->owner = $owner;
     $currentProject->gender = $gender;
     //$currentProject->materials = $materials;
     $currentProject->steps = $steps;
     $currentProject->media = $media;
     $currentProject->documents = $documents;
     return $currentProject;
 }