本文整理匯總了PHP中BaseController::httpError方法的典型用法代碼示例。如果您正苦於以下問題:PHP BaseController::httpError方法的具體用法?PHP BaseController::httpError怎麽用?PHP BaseController::httpError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BaseController
的用法示例。
在下文中一共展示了BaseController::httpError方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: voted
public function voted()
{
if ($this->exist_validation->fails()) {
return BaseController::httpError($this->exist_validation);
} else {
if ($this->vote_check->missingVote()) {
return BaseController::httpNotFound();
} else {
return BaseController::httpOk();
}
}
}
示例2: destroy
public function destroy()
{
if ($this->delete_validation->fails()) {
return BaseController::httpError($this->delete_validation);
} else {
if ($this->follow_check->missing()) {
return BaseController::httpNotfound();
} else {
$this->follow_gestion->destroy();
BaseController::httpOk();
}
}
}
示例3: update
/**
* Update the specified resource in storage.
*
* @param int $id
* @return Response
*/
public function update($id)
{
if ($this->update_validation->fails($id)) {
return BaseController::httpError($this->update_validation);
} else {
if ($this->group_check->update($id)) {
return BaseController::httpNotFound();
} else {
$this->group_gestion->update($id);
return BaseController::httpOk();
}
}
}
示例4: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy()
{
if ($this->delete_validation->fails()) {
return BaseController::httpError($this->delete_validation);
} elseif (!$this->friend_check->exist()) {
return BaseController::httpNotFound();
} else {
$this->friend_gestion->destroy();
return BaseController::httpOk();
}
}
示例5: voteFeed
public function voteFeed()
{
if ($this->list_validation->fails()) {
return BaseController::httpError($this->list_validation);
} else {
return BaseController::httpContent($this->post_gestion->voteFeed(), 'vote_feed');
}
}
示例6: activate
/**
* Activate a specified user.
*
* @param int $id
* @return Response
*/
public function activate()
{
if ($this->activate_validation->fails()) {
return BaseController::httpError($this->activate_validation);
} else {
if ($this->user_check->badToken()) {
return BaseController::httpNotFound();
} else {
$this->user_gestion->activate();
return BaseController::httpOk();
}
}
}