当前位置: 首页>>代码示例>>PHP>>正文


PHP Issue::findOrFail方法代码示例

本文整理汇总了PHP中Issue::findOrFail方法的典型用法代码示例。如果您正苦于以下问题:PHP Issue::findOrFail方法的具体用法?PHP Issue::findOrFail怎么用?PHP Issue::findOrFail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Issue的用法示例。


在下文中一共展示了Issue::findOrFail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: store

 public function store()
 {
     //metodo no usado, se maneja por ajax las peticiones
     $task = new Task();
     $task->name = Input::get("name");
     $task->summary = Input::get("summary");
     $task->points = Input::get("points");
     $task->timeEstimated = Input::get("hours");
     $task->timeRemaining = Input::get("hours");
     $task->scrumid = 1;
     //estado todo ...quemado por código
     $task->issueid = Input::get("issueid");
     $task->userid = Input::get("selAssignee");
     $task->save();
     $issue = Issue::findOrFail($task->issueid);
     echo $issue->id;
     die;
     $iteration = $issue->iteration;
     $iteration->estimatedTime = $iteration->estimatedTime + $task->timeEstimated;
     $iteration->save();
     //die;
 }
开发者ID:josimarjimenez,项目名称:architects,代码行数:22,代码来源:TaskController.php

示例2: foreach

             $total = Input::get("toP_" . $id);
             $totalPersonal += $total;
             $task->typePersonal()->attach([$id => ['quantity' => $cantidad, 'hours' => $hours, 'total' => $total]]);
         }
     }
     //obtener los gastos adicionales de la tarea
     $gastos = AdditionalCost::where('taskid', '=', $id)->get();
     $totalSpent = 0;
     if (count($gastos) > 0) {
         foreach ($gastos as $gasto) {
             $totalSpent += $gasto->total;
         }
     }
     //actualizar la iteracion y el proyecto
     $totalTask = $totalMaterial + $totalPersonal + $totalSpent;
     $issue = Issue::findOrFail($task->issueid);
     $iteration = Iterations::findOrFail($issue->iterationid);
     $project = Project::findOrFail($iteration->projectid);
     //iteracion
     $iteration->realBudget = $iteration->realBudget + $totalTask;
     $iteration->save();
     //proyecto
     $project->budgetReal = $project->budgetReal + $totalTask;
     $project->save();
     $final = "yes";
     //actualizar a finalizado la tarea
     $task->closed = 'SI';
     $task->save();
 }
 $user = User::findOrFail($task->userid);
 return Response::json(array('succes' => '1', 'task' => $task, 'user' => $user, 'final' => $final));
开发者ID:josimarjimenez,项目名称:architects,代码行数:31,代码来源:routes.php

示例3: update

 public function update($id)
 {
     $issue = Issue::findOrFail($id);
     $issue->issue = Input::get('issue');
     $issue->save();
 }
开发者ID:emanmks,项目名称:oneschool,代码行数:6,代码来源:IssuesController.php


注:本文中的Issue::findOrFail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。