diff --git a/app/Http/Controllers/Admin/Stats/LevelController.php b/app/Http/Controllers/Admin/Stats/LevelController.php index a53a3e5112..de013f9518 100644 --- a/app/Http/Controllers/Admin/Stats/LevelController.php +++ b/app/Http/Controllers/Admin/Stats/LevelController.php @@ -17,15 +17,15 @@ class LevelController extends Controller { * * @return \Illuminate\Contracts\Support\Renderable */ - public function getLevels($type = 'Character') { + public function getLevels(Request $request, $type = 'Character') { $levels = Level::ordered($type); - $page = (int) request('page', 1); - $perPage = 20; + // $page = (int) request('page', 1); + // $perPage = 20; return view('admin.levels.levels', [ 'type' => $type, - 'levels' => $levels->forPage($page, $perPage), + 'levels' => $levels->paginate(20)->appends($request->query()), ]); } diff --git a/app/Models/Claymore/Gear.php b/app/Models/Claymore/Gear.php index 5afa55947d..233cc6af80 100644 --- a/app/Models/Claymore/Gear.php +++ b/app/Models/Claymore/Gear.php @@ -235,7 +235,7 @@ public function getImageUrlAttribute() { * @return string */ public function getUrlAttribute() { - return url('world/gear?name='.$this->name); + return url('world/gears?name='.$this->name); } /** @@ -244,7 +244,7 @@ public function getUrlAttribute() { * @return string */ public function getIdUrlAttribute() { - return url('world/gear/'.$this->id); + return url('world/gears/'.$this->id); } /** diff --git a/app/Services/Stat/StatService.php b/app/Services/Stat/StatService.php index cdba2fef6b..4baf528887 100644 --- a/app/Services/Stat/StatService.php +++ b/app/Services/Stat/StatService.php @@ -66,7 +66,7 @@ public function updateStat($stat, $data) { if (!isset($data['name'])) { throw new \Exception('Please provide a name for the stat.'); } - if (!isset($data['base'])) { + if ($stat->id !== config('lorekeeper.claymores_and_companions.stat_points.general_id') && !isset($data['base'])) { throw new \Exception('Please set a base stat value.'); } if (isset($data['colour'])) { diff --git a/database/migrations/2026_03_07_225854_fix_gear_descriptions.php b/database/migrations/2026_03_07_225854_fix_gear_descriptions.php new file mode 100644 index 0000000000..44127d7625 --- /dev/null +++ b/database/migrations/2026_03_07_225854_fix_gear_descriptions.php @@ -0,0 +1,25 @@ +text('description')->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void { + Schema::table('gears', function (Blueprint $table) { + $table->string('description')->change(); + }); + } +}; diff --git a/resources/views/admin/claymores/gear/create_edit_gear.blade.php b/resources/views/admin/claymores/gear/create_edit_gear.blade.php index e4c63aa467..475818afb7 100644 --- a/resources/views/admin/claymores/gear/create_edit_gear.blade.php +++ b/resources/views/admin/claymores/gear/create_edit_gear.blade.php @@ -126,6 +126,10 @@ 'description' => $gear->description, 'searchUrl' => $gear->searchUrl, 'visible' => $gear->is_visible, + 'edit' => [ + 'title' => 'Edit Gear', + 'object' => $gear, + ], ]) diff --git a/resources/views/admin/claymores/gear/create_edit_gear_category.blade.php b/resources/views/admin/claymores/gear/create_edit_gear_category.blade.php index 7b74e0ac1b..65ccca51a2 100644 --- a/resources/views/admin/claymores/gear/create_edit_gear_category.blade.php +++ b/resources/views/admin/claymores/gear/create_edit_gear_category.blade.php @@ -66,11 +66,13 @@

Preview

- @include('world._claymore_entry', [ - 'item' => null, + @include('world._entry', [ + 'edit' => ['object' => $category, 'title' => 'Gear Category'], + 'item' => $category, 'imageUrl' => $category->categoryImageUrl, 'name' => $category->displayName, - 'description' => $category->description, + 'description' => $category->parsed_description, + 'searchUrl' => $category->searchUrl, 'category' => $category, 'visible' => $category->is_visible, ]) diff --git a/resources/views/admin/claymores/weapon/create_edit_weapon.blade.php b/resources/views/admin/claymores/weapon/create_edit_weapon.blade.php index 5679d19384..cf1c46bb9b 100644 --- a/resources/views/admin/claymores/weapon/create_edit_weapon.blade.php +++ b/resources/views/admin/claymores/weapon/create_edit_weapon.blade.php @@ -126,6 +126,10 @@ 'description' => $weapon->description, 'searchUrl' => $weapon->searchUrl, 'visible' => $weapon->is_visible, + 'edit' => [ + 'title' => 'Edit Weapon', + 'object' => $weapon, + ], ])
diff --git a/resources/views/admin/claymores/weapon/create_edit_weapon_category.blade.php b/resources/views/admin/claymores/weapon/create_edit_weapon_category.blade.php index 20e3308fa3..c3f38bc5ea 100644 --- a/resources/views/admin/claymores/weapon/create_edit_weapon_category.blade.php +++ b/resources/views/admin/claymores/weapon/create_edit_weapon_category.blade.php @@ -66,11 +66,13 @@

Preview

- @include('world._claymore_entry', [ - 'item' => null, + @include('world._entry', [ + 'edit' => ['object' => $category, 'title' => 'Weapon Category'], + 'item' => $category, 'imageUrl' => $category->categoryImageUrl, 'name' => $category->displayName, - 'description' => $category->description, + 'description' => $category->parsed_description, + 'searchUrl' => $category->searchUrl, 'category' => $category, 'visible' => $category->is_visible, ]) diff --git a/resources/views/admin/elements/create_edit_element.blade.php b/resources/views/admin/elements/create_edit_element.blade.php index 84441737e6..2af8509151 100644 --- a/resources/views/admin/elements/create_edit_element.blade.php +++ b/resources/views/admin/elements/create_edit_element.blade.php @@ -114,6 +114,7 @@ @section('scripts') @parent + @include('js._tinymce_wysiwyg')