@@ -259,7 +259,7 @@ abstract class ModuleController extends Controller
259259 protected $ submodule = false ;
260260
261261 /**
262- * @var int|null
262+ * @var int|string| null
263263 */
264264 protected $ submoduleParentId = null ;
265265
@@ -970,7 +970,7 @@ protected function getParentModuleIdFromRequest(Request $request)
970970 /**
971971 * @return IlluminateView|JsonResponse
972972 */
973- public function index (? int $ parentModuleId = null ): mixed
973+ public function index (int | string | null $ parentModuleId = null ): mixed
974974 {
975975 $ this ->authorizeOption ('list ' , $ this ->moduleName );
976976
@@ -1032,7 +1032,7 @@ public function browser(): JsonResponse
10321032 }
10331033
10341034 /**
1035- * @param int|null $parentModuleId
1035+ * @param int|string| null $parentModuleId
10361036 * @return \Illuminate\Http\JsonResponse
10371037 */
10381038 public function store ($ parentModuleId = null )
@@ -1093,7 +1093,7 @@ public function store($parentModuleId = null)
10931093 /**
10941094 * @param Request $request
10951095 * @param int|string $id
1096- * @param int|null $submoduleId
1096+ * @param int|string| null $submoduleId
10971097 * @return \Illuminate\Http\RedirectResponse
10981098 */
10991099 public function show ($ id , $ submoduleId = null )
@@ -1169,7 +1169,7 @@ public function edit(TwillModelContract|int|string $id): mixed
11691169 );
11701170 }
11711171
1172- public function create (int $ parentModuleId = null ): JsonResponse |RedirectResponse |IlluminateView
1172+ public function create (int | string $ parentModuleId = null ): JsonResponse |RedirectResponse |IlluminateView
11731173 {
11741174 if (! $ this ->getIndexOption ('skipCreateModal ' )) {
11751175 return Redirect::to (
@@ -1205,7 +1205,7 @@ public function create(int $parentModuleId = null): JsonResponse|RedirectRespons
12051205 );
12061206 }
12071207
1208- public function update (int |string |TwillModelContract $ id , ? int $ submoduleId = null ): JsonResponse
1208+ public function update (int |string |TwillModelContract $ id , int | string | null $ submoduleId = null ): JsonResponse
12091209 {
12101210 [$ item , $ id ] = $ this ->itemAndIdFromRequest ($ id );
12111211
@@ -1435,7 +1435,7 @@ public function bulkPublish(): JsonResponse
14351435 );
14361436 }
14371437
1438- public function duplicate (int |string |TwillModelContract $ id , ? int $ submoduleId = null ): JsonResponse
1438+ public function duplicate (int |string |TwillModelContract $ id , int | string | null $ submoduleId = null ): JsonResponse
14391439 {
14401440 [$ item , $ id ] = $ this ->itemAndIdFromRequest ($ id );
14411441
@@ -1475,7 +1475,7 @@ public function duplicate(int|string|TwillModelContract $id, ?int $submoduleId =
14751475 );
14761476 }
14771477
1478- public function destroy (int |string |TwillModelContract $ id , ? int $ submoduleId = null ): JsonResponse
1478+ public function destroy (int |string |TwillModelContract $ id , int | string | null $ submoduleId = null ): JsonResponse
14791479 {
14801480 [$ item , $ id ] = $ this ->itemAndIdFromRequest ($ id );
14811481
0 commit comments