バージョン選択

フォーラム

メニュー

オンライン状況

48 人のユーザが現在オンラインです。 (39 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 48
もっと...

サイト内検索

質問 > 管理機能 > Controllerからviewにajax利用して一覧を渡す方法

管理機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
start
投稿日時: 2021/12/29 20:51
対応状況: −−−
一人前
登録日: 2017/11/9
居住地:
投稿: 109
Controllerからviewにajax利用して一覧を渡す方法
お疲れ様です。
以下のreturn でエラー(エラーコード:500)が発生しています。一つだけを('lists' => $Lists[0]->getId())確認したら問題なく戻っています。
$Lists に一覧を戻したいです。
宜しくお願いいたします。

/**
* @Route("/%eccube_admin_route%/product/delivery/list", name="admin_product_delivery_list", methods={"POST"})
*/
public function subSelect(Request $request)
{
if (!$request->isXmlHttpRequest()) {
throw new BadRequestHttpException();
}

$id = (int)$request->get('id');
if(is_null($id) || empty($id)){
return $this->json(array('status' => 'NG'), 200);
}else{
$Sector = $this->sectorRepository->find($id);
$Lists = $this->productDeliveryTestRepository->findBy(
['Sector' => $Sector]
);

return $this->json(array(
'status' => 'OK',
'lists' => $Lists,
), 200);
}
}
▼テンプレート
[EC-CUBE] EC-CUBE4.06
[OS] MacOS
[PHP] PHP7.3
[データベース] Mysql
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
 » Controllerからviewにajax利用して一覧を渡す方法 start 2021/12/29 20:51
     Re: Controllerからviewにajax利用して一覧を渡す方法 Buchiii 2021/12/29 22:31
       Re: Controllerからviewにajax利用して一覧を渡す方法 start 2021/12/30 12:33
         Re: Controllerからviewにajax利用して一覧を渡す方法 Buchiii 2021/12/30 14:22
           Re: Controllerからviewにajax利用して一覧を渡す方法 start 2021/12/30 14:55
           Re: Controllerからviewにajax利用して一覧を渡す方法 start 2021/12/30 16:02

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は89,073名です
総投稿数は110,023件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1296
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.