Skip to content

Commit

Permalink
Merge pull request #200 from P3D-Legacy/hotfix-category-creation
Browse files Browse the repository at this point in the history
Fixed creating categories in admin panel
  • Loading branch information
dsbilling authored Aug 18, 2022
2 parents f27af21 + f3b3c85 commit 3f2a468
Show file tree
Hide file tree
Showing 4 changed files with 530 additions and 337 deletions.
1 change: 1 addition & 0 deletions app/Console/Commands/DiscordRoleSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function handle()
foreach ($server_roles as $server_role) {
if (str_starts_with($server_role->name, '⁣     ^')) {
$this->info('Skipping role: '.$server_role->name);

continue;
}
$this->info('Syncing role: '.$server_role->name);
Expand Down
1 change: 1 addition & 0 deletions app/Console/Commands/DiscordUserRoleSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function handle()
} catch (\Exception $exception) {
$this->error('Error syncing roles for '.$account->username);
$this->error($exception->getMessage());

continue;
}
}
Expand Down
4 changes: 4 additions & 0 deletions app/Nova/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public function fields(NovaRequest $request)
->displayUsing(function ($name, $resource) {
return str_repeat('→ ', $resource->depth).$name;
})->asHtml()->onlyOnIndex(),
Text::make('Name')
->sortable()
->rules('required', 'max:255')
->onlyOnForms(),
Select::make('Parent Model', 'parent_id')
->options(function () {
return Category::where('id', '!=', $this->id)
Expand Down
Loading

0 comments on commit 3f2a468

Please sign in to comment.