Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Oct 21, 2023
1 parent 44f79d4 commit 355215f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Fields/Slug.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Closure;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
Expand Down Expand Up @@ -152,7 +153,7 @@ static function (Builder $query): Builder {
$value = is_null($match) ? $value : preg_replace_callback(
sprintf('/%s([\d]+)?$/', preg_quote($this->separator)),
static function (array $match): string {
return str_replace($match[1], ((int) $match[1]) + 1, $match[0]);
return str_replace($match[1], (string) (((int) $match[1]) + 1), $match[0]);
},
$match
);
Expand Down
1 change: 1 addition & 0 deletions src/Http/Controllers/ActionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ActionController extends Controller
*/
public function __invoke(Request $request): RedirectResponse
{
/** @var \Cone\Root\Actions\Action $action */
$action = $request->route('rootAction');

Gate::allowIf($action->authorized($request));
Expand Down

0 comments on commit 355215f

Please sign in to comment.