本文整理汇总了PHP中Response::alert方法的典型用法代码示例。如果您正苦于以下问题:PHP Response::alert方法的具体用法?PHP Response::alert怎么用?PHP Response::alert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Response
的用法示例。
在下文中一共展示了Response::alert方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterValidation
public function afterValidation(&$data)
{
$ex = DBWOGExchangeLog::find($data['eb_id']);
if ($data['pkval'] && $ex && $data['pkval'] != $data['eb_id']) {
Response::alert("ID重複");
}
}
示例2: afterValidation
public function afterValidation(&$data)
{
$item = DBWOGItem::find($data['syn_result']);
if (!$item) {
Response::alert("合成結果(d_id={$data['syn_result']})不存在");
}
$list = preg_split('/[\\*\\,]/i', $data['syn_element']);
for ($i = 0, $len = count($list); $i < $len; $i += 2) {
$item = DBWOGItem::find($list[$i]);
if (!$item) {
Response::alert("物品(id={$list[$i]})不存在");
}
if (!ctype_digit(strval($list[$i + 1])) || $list[$i + 1] < 0) {
Response::alert("第" . ($i + 2) / 2 . "項材料的數量({$list[$i + 1]})不是正整數");
}
}
if ($data['syn_mission'] > 0) {
$mission = DBWOGMission::find($data['syn_mission']);
if (!$mission) {
Response::alert("專屬任務(m_id={$data['syn_mission']})不存在");
}
}
if ($data['syn_need_mission'] > 0) {
$mission = DBWOGMission::find($data['syn_need_mission']);
if (!$mission) {
Response::alert("前置任務(m_id={$data['syn_need_mission']})不存在");
}
}
}
示例3: afterValidation
public function afterValidation(&$data)
{
$ex = DBWOGPlayerTeam::find($data['m_id']);
if ($data['pkval'] && $ex && $data['pkval'] != $data['m_id']) {
Response::alert("ID重複");
}
foreach ([1, 2, 3, 4, 5] as $n) {
if ($data["skill_{$n}"] > 0) {
$s = DBWOGSkill::find($data["skill_{$n}"]);
if (!$s) {
Response::alert("技能{$n}(s_id={$data["skill_{$n}"]})不存在");
}
}
}
if ($data['d_id']) {
foreach (explode(',', $data['d_id']) as $d_id) {
$d = DBWOGItem::find($d_id);
if (!$d) {
Response::alert("道具(d_id={$d_id})不存在");
}
}
}
if ($data['m_mission'] > 0) {
$m = DBWOGMission::find($data['m_mission']);
if (!$m) {
Response::alert("任務(m_id={$data['m_mission']})不存在");
}
}
}
示例4: afterValidation
public function afterValidation(&$data)
{
$ex = DBWOGPlayerTeam::find($data['i_id']);
if ($data['pkval'] && $ex && $data['pkval'] != $data['i_id']) {
Response::alert("ID重複");
}
}
示例5: del
public function del($id)
{
$id = (int) $id;
App::error(function (ModelNotFoundException $e) {
return Response::alert("玩家不存在");
});
$p = DBWOGPlayer::findOrFail($id);
$p->delete();
return Response::json(['reload' => TRUE]);
}
示例6: afterValidation
public function afterValidation(&$data)
{
$ex = DBWOGPlayerTeam::find($data['t_id']);
if ($data['pkval'] && $ex && $data['pkval'] != $data['t_id']) {
Response::alert("ID重複");
}
$ex = DBWOGPlayer::find($data['p_id']);
if (!$ex) {
Response::alert("玩家(p_id={$data['p_id']})不存在");
}
}
示例7: afterValidation
public function afterValidation(&$data)
{
$item = DBWOGItem::find($data['d_id']);
if (!$item) {
Response::alert("物品(d_id={$data['d_id']})不存在");
}
$stone = DBWOGItemKey::with('item')->find($data['d_id']);
if ($stone && $data['d_id'] != $data['pkval']) {
Response::alert("{$stone->item->d_name}(d_id={$data['d_id']})已有定義,不可重複定義");
}
}
示例8: afterValidation
public function afterValidation(&$data)
{
$item = DBWOGItem::find($data['item_id']);
if (!$item) {
Response::alert("物品(item_id={$data['item_id']})不存在");
}
$item = DBWOGItemHonor::where('item_Id', '=', $data['item_id'])->with('item')->get();
if (count($item) > 0 && (!$data['pkval'] || $data['pkval'] != $item[0]->h_id)) {
Response::alert("{$item[0]->item->d_name}(d_id={$data['item_id']})已有定義,不可重複定義");
}
}
示例9: del
public function del($id)
{
$id = (int) $id;
App::error(function (ModelNotFoundException $e) {
return Response::alert("不存在的項目");
});
$p = call_user_func(array($this->dbname, 'findOrFail'), $id);
$p->delete();
if (method_exists($this, 'teardown')) {
$this->teardown($data);
}
return Response::json(['reload' => TRUE]);
}
示例10: afterValidation
public function afterValidation(&$data)
{
$ex = DBWOGCharacter::find($data['ch_id']);
if (isset($data['pkval']) && $ex && $data['pkval'] != $data['ch_id']) {
Response::alert("ID重複");
}
if ($data['ch_main'] > 0) {
$ch = DBWOGCharacter::find($data['ch_main']);
if (!$ch) {
Response::alert("親職業(ch_id={$data['ch_main']})不存在");
}
}
}
示例11: afterValidation
public function afterValidation(&$data)
{
$player = DBWOGPlayer::find($data['p_id']);
if (!$player) {
Response::alert("拍賣玩家(p_id={$data['p_id']})不存在");
}
if ($data['e_p_id'] > 0) {
$eplayer = DBWOGPlayer::find($data['e_p_id']);
if (!$eplayer) {
Response::alert("競標玩家(p_id={$data['e_p_id']})不存在");
}
}
$item = DBWOGItem::find($data['d_id']);
if (!$item) {
Response::alert("拍賣物品(d_id={$data['d_id']})不存在");
}
$sale = DBWOGItemSale::find($data['s_id']);
if ($data['pkval'] && $sale && $data['pkval'] != $data['s_id']) {
Response::alert("ID重複");
}
}
示例12: afterValidation
public function afterValidation(&$data)
{
$ex = DBWOGCharacterSkill::find($data['s_id']);
if ($data['pkval'] && $ex && $data['pkval'] != $data['s_id']) {
Response::alert("ID重複");
}
$ch = DBWOGCharacter::find($data['ch_id']);
if (!$ch) {
Response::alert("職業(ch_id={$data['ch_id']})不存在");
}
if ($data['main_sid'] > 0) {
$s = DBWOGCharacterSkill::find($data['main_sid']);
if (!$s) {
Response::alert("親技能(s_id={$data['main_sid']})不存在");
}
}
if ($data['need_sid'] > 0) {
$s = DBWOGCharacterSkill::find($data['need_sid']);
if (!$s) {
Response::alert("前置技能(s_id={$data['need_sid']})不存在");
}
}
}