让当前进入最后

时间:2017-11-23 09:44:39

标签: javascript html laravel move

我可以知道在更新之后如何将当前值移动到最后?
我想用Id 1(Screenshot)更新记录后,将当前表格移至最后

例如,如果列当前中的值为 15 ,并且我将其更新为 14 ,则列最后<< / strong>必须设置为 15

public function updateOthers(Request $request, $id)
{
    $other = other::find($id);


    $other->otherInitialRequirementCountLast=$other->otherInitialRequirementCount;
    $other->otherInitialSolutionCountLast=$other->otherInitialSolutionCount;
    $other->otherFeedbackCountLast=$other->otherFeedbackCount;
    $other->otherSolutionDesignCountLast=$other->otherSolutionDesignCount;
    $other->otherSolutionDevelopmentCountLast=$other->otherSolutionDevelopmentCount;
    $other->otherPOCCountLast=$other->otherPOCCount;
    $other->otherProposalReadyCountLast=$other->otherProposalReadyCount;

    $other->projectName=$request->input('projectName');
    $other->segment=$request->input('segment');
    $other->description=$request->input('description');
    $other->customer=$request->input('customer');
    $other->lastAction=$request->input('lastAction');
    $other->nextAction=$request->input('nextAction');
    $other->status=$request->input('status');
    $other->information=$request->input('information');
    $other->currentProgress=$request->input('currentProgress');
    $other->startProject=$request->input('startProject');
    $other->finishProject=$request->input('finishProject');        

    $other->otherInitialRequirementCount=$other->where('currentProgress','Like','Initial Requirement')->count();
    $other->otherInitialSolutionCount=$other->where('currentProgress','Like','Initial Solution')->count();
    $other->otherFeedbackCount=$other->where('currentProgress','Like','Menunggu Feedback & Gathering Req')->count();
    $other->otherSolutionDesignCount=$other->where('currentProgress','Like','Solution Design')->count();
    $other->otherSolutionDevelopmentCount=$other->where('currentProgress','Like','Solution Development')->count();
    $other->otherPOCCount=$other->where('currentProgress','Like','POC')->count();
    $other->otherProposalReadyCount=$other->where('currentProgress','Like','Proposal Ready')->count();


    $other->update();

  return redirect::to('/tableOthers');
}

请帮我解决这个问题。

0 个答案:

没有答案