diff --git a/app/Http/Controllers/ModpackController.php b/app/Http/Controllers/ModpackController.php index cf6260ac..5d746a8b 100644 --- a/app/Http/Controllers/ModpackController.php +++ b/app/Http/Controllers/ModpackController.php @@ -250,6 +250,7 @@ public function postCreate(): RedirectResponse $rules = [ 'name' => 'required|unique:modpacks', 'slug' => 'required|unique:modpacks', + 'hidden' => 'sometimes|required', ]; $messages = [ @@ -266,7 +267,7 @@ public function postCreate(): RedirectResponse $modpack = new Modpack; $modpack->name = Request::input('name'); $modpack->slug = Str::slug(Request::input('slug')); - $modpack->hidden = Request::input('hidden') ? false : true; + $modpack->hidden = request()->boolean('hidden'); $modpack->icon_md5 = null; $modpack->icon_url = URL::asset('/resources/default/icon.png'); $modpack->logo_md5 = null; diff --git a/resources/views/modpack/create.blade.php b/resources/views/modpack/create.blade.php index 8fef35fa..5014fb54 100644 --- a/resources/views/modpack/create.blade.php +++ b/resources/views/modpack/create.blade.php @@ -30,6 +30,17 @@ +
Hidden modpacks will not show up in the API response for the + modpack list. However, anyone with the modpack's slug can access all of its + information.
+Creating a modpack is simple. Fill in the information here.
diff --git a/resources/views/modpack/edit.blade.php b/resources/views/modpack/edit.blade.php index d3a7dd33..eca4640e 100644 --- a/resources/views/modpack/edit.blade.php +++ b/resources/views/modpack/edit.blade.php @@ -41,9 +41,9 @@ hidden ? ' checked' : '') }}> - Hidden modpacks will not show up in the API response for the - modpack list regardless of whether or not a client has access to the modpack. - +Hidden modpacks will not show up in the API response for the + modpack list. However, anyone with the modpack's slug can access all of its + information.