Skip to content

Commit

Permalink
细节优化
Browse files Browse the repository at this point in the history
  • Loading branch information
slowlyo committed Oct 12, 2023
1 parent f4d5f79 commit ecac02a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/Console/Module/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ protected function updateViews()
$modules = config('admin.modules');

if (blank($modules)) {
$this->warn('No modules, please check config: [admin.modules]');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/AdminRoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function setPermission()
->multiple()
->options(AdminPermissionService::make()->getTree())
->searchable()
->onlyChildren()
->cascade()
->joinValues(false)
->extractValue()
->size('full')
Expand Down
5 changes: 0 additions & 5 deletions src/Support/Cores/JsonResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Slowlyo\OwlAdmin\Support\Cores;

use Slowlyo\OwlAdmin\Renderers\BaseRenderer;
use Illuminate\Http\Resources\Json\JsonResource;

class JsonResponse
Expand Down Expand Up @@ -45,10 +44,6 @@ public function success($data = null, string $message = ''): \Illuminate\Http\Js
$data = (object)$data;
}

if ($data instanceof BaseRenderer) {
$data = $data->toArray();
}

return response()->json(array_merge($this->additionalData, ['data' => $data]));
}

Expand Down

0 comments on commit ecac02a

Please sign in to comment.