Skip to content

Commit

Permalink
修复api路由问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yidalh committed Sep 25, 2020
1 parent 8e64d61 commit 62de2c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ public function getResourceId()

public function resource($slice = -2): string
{

$segments = explode('/', trim(admin_api_url(request()->path()), '/'));

if ($slice !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function admin_api_url($path = '', $parameters = [], $secure = null)
return $path;
}
$secure = $secure ?: (config('admin.https') || config('admin.secure'));
return url(admin_api_base_path($path), $parameters, $secure);
return url($path, $parameters, $secure);
}
}

Expand Down

0 comments on commit 62de2c4

Please sign in to comment.