本文整理汇总了PHP中BaseController::httpOk方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseController::httpOk方法的具体用法?PHP BaseController::httpOk怎么用?PHP BaseController::httpOk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseController
的用法示例。
在下文中一共展示了BaseController::httpOk方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
if ($this->group_check->destroy($id)) {
return BaseController::httpNotFound();
} else {
$this->group_gestion->delete($id);
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: 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();
}
}
示例4: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
if ($this->comment_check->missing($id)) {
return BaseController::httpNotFound();
} else {
$this->comment_gestion->destroy($id);
return BaseController::httpOk();
}
}
示例5: privacy
/**
* Update the privacy for a specified resource in storage.
*
* @param int $id
* @return Response
*/
public function privacy($id)
{
if ($this->privacy_validation->fails($id)) {
return BaseController::httpError($this->privacy_validation);
} else {
if ($this->post_check->missing($id)) {
return BaseController::httpNotFound();
} else {
$this->post_gestion->privacy($id);
return BaseController::httpOk();
}
}
}
示例6: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy()
{
if ($this->vote_check->badVote()) {
return BaseController::httpNotFound();
} else {
$this->vote_gestion->destroy();
return BaseController::httpOk();
}
}
示例7: avatar
public function avatar($id)
{
/*if($this->avatar_validation->fails())
{
return BaseController::httpError($this->avatar_validation);
}else*/
if ($this->user_check->missing($id)) {
return BaseController::httpNotFound();
} else {
$this->user_gestion->avatar($id);
return BaseController::httpOk();
}
}