@@ -25,26 +25,26 @@ class UserController extends AdminController
2525{
2626 public function index (UsersDataTable $ dataTable )
2727 {
28- Breadcrumb::add (__ ('admin ::translation.users ' ));
28+ Breadcrumb::add (__ ('core ::translation.users ' ));
2929
3030 return $ dataTable ->render (
31- 'admin::network .user.index ' ,
31+ 'core::admin .user.index ' ,
3232 []
3333 );
3434 }
3535
3636 public function create ()
3737 {
38- Breadcrumb::add (__ ('admin ::translation.users ' ), admin_url ('users ' ));
38+ Breadcrumb::add (__ ('core ::translation.users ' ), admin_url ('users ' ));
3939
40- Breadcrumb::add (__ ('admin ::translation.add_user ' ));
40+ Breadcrumb::add (__ ('core ::translation.add_user ' ));
4141
4242 $ model = new User ();
4343 $ action = action ([static ::class, 'store ' ]);
4444 $ roles = Role::get ();
4545
4646 return view (
47- 'admin::network .user.form ' ,
47+ 'core::admin .user.form ' ,
4848 compact ('model ' , 'action ' , 'roles ' )
4949 );
5050 }
@@ -53,17 +53,17 @@ public function edit(string $id)
5353 {
5454 $ model = User::where ('is_super_admin ' , '!= ' , true )->find ($ id );
5555
56- abort_if ($ model === null , 404 , __ ('admin ::translation.user_not_found ' ));
56+ abort_if ($ model === null , 404 , __ ('core ::translation.user_not_found ' ));
5757
58- Breadcrumb::add (__ ('admin ::translation.users ' ), admin_url ('users ' ));
58+ Breadcrumb::add (__ ('core ::translation.users ' ), admin_url ('users ' ));
5959
60- Breadcrumb::add (__ ('admin ::translation.edit_user_name ' , ['name ' => $ model ->name ]));
60+ Breadcrumb::add (__ ('core ::translation.edit_user_name ' , ['name ' => $ model ->name ]));
6161
6262 $ action = action ([static ::class, 'update ' ], ['id ' => $ model ->id ]);
6363 $ roles = Role::get ();
6464
6565 return view (
66- 'admin::network .user.form ' ,
66+ 'core::admin .user.form ' ,
6767 compact ('model ' , 'action ' , 'roles ' )
6868 );
6969 }
@@ -81,15 +81,15 @@ public function store(UserRequest $request): JsonResponse|RedirectResponse
8181 $ model = User::create ($ data );
8282
8383 return $ this ->success (
84- __ ('admin ::translation.user_name_created_successfully ' , ['name ' => $ model ->name ]),
84+ __ ('core ::translation.user_name_created_successfully ' , ['name ' => $ model ->name ]),
8585 );
8686 }
8787
8888 public function update (UserRequest $ request , string $ id ): JsonResponse |RedirectResponse
8989 {
9090 $ model = User::where ('is_super_admin ' , '!= ' , true )->find ($ id );
9191
92- abort_if ($ model === null , 404 , __ ('admin ::translation.user_not_found ' ));
92+ abort_if ($ model === null , 404 , __ ('core ::translation.user_not_found ' ));
9393
9494 $ data = $ request ->safe ()->all ();
9595
@@ -102,20 +102,20 @@ public function update(UserRequest $request, string $id): JsonResponse|RedirectR
102102 $ model ->update ($ data );
103103
104104 return $ this ->success (
105- __ ('admin ::translation.user_name_updated_successfully ' , ['name ' => $ model ->name ]),
105+ __ ('core ::translation.user_name_updated_successfully ' , ['name ' => $ model ->name ]),
106106 );
107107 }
108108
109109 public function destroy (string $ id ): JsonResponse |RedirectResponse
110110 {
111111 $ model = User::where ('is_super_admin ' , '!= ' , true )->find ($ id );
112112
113- abort_if ($ model === null , 404 , __ ('admin ::translation.user_not_found ' ));
113+ abort_if ($ model === null , 404 , __ ('core ::translation.user_not_found ' ));
114114
115115 $ model ->delete ();
116116
117117 return $ this ->success (
118- __ ('admin ::translation.user_name_deleted_successfully ' , ['name ' => $ model ->name ]),
118+ __ ('core ::translation.user_name_deleted_successfully ' , ['name ' => $ model ->name ]),
119119 );
120120 }
121121
@@ -127,21 +127,21 @@ public function bulk(BulkActionsRequest $request): JsonResponse|RedirectResponse
127127 switch ($ action ) {
128128 case 'delete ' :
129129 User::whereIn ('id ' , $ ids )->where ('is_super_admin ' , '!= ' , true )->delete ();
130- return $ this ->success (__ ('admin ::translation.selected_users_deleted_successfully ' ));
130+ return $ this ->success (__ ('core ::translation.selected_users_deleted_successfully ' ));
131131 case 'activate ' :
132132 User::whereIn ('id ' , $ ids )->where ('is_super_admin ' , '!= ' ,
133133 true )->update (['status ' => UserStatus::ACTIVE ]);
134- return $ this ->success (__ ('admin ::translation.selected_users_activated_successfully ' ));
134+ return $ this ->success (__ ('core ::translation.selected_users_activated_successfully ' ));
135135 case 'deactivate ' :
136136 User::whereIn ('id ' , $ ids )->where ('is_super_admin ' , '!= ' ,
137137 true )->update (['status ' => UserStatus::INACTIVE ]);
138- return $ this ->success (__ ('admin ::translation.selected_users_deactivated_successfully ' ));
138+ return $ this ->success (__ ('core ::translation.selected_users_deactivated_successfully ' ));
139139 case 'banned ' :
140140 User::whereIn ('id ' , $ ids )->where ('is_super_admin ' , '!= ' ,
141141 true )->update (['status ' => UserStatus::BANNED ]);
142- return $ this ->success (__ ('admin ::translation.selected_users_banned_successfully ' ));
142+ return $ this ->success (__ ('core ::translation.selected_users_banned_successfully ' ));
143143 default :
144- return $ this ->error (__ ('admin ::translation.invalid_action ' ));
144+ return $ this ->error (__ ('core ::translation.invalid_action ' ));
145145 }
146146 }
147147}
0 commit comments