Skip to content

Commit 4c2a371

Browse files
committed
2 parents bc66c4b + c14233b commit 4c2a371

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/LaravelUniqueUrls.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public function handleRequest(Url $urlObj, Request $request)
1818
if (method_exists($slugController, '__invoke') && $urlObj->getAttribute('method') === '') {
1919
// if it is livewire
2020
$request->route()->setParameter('arguments', $arguments);
21+
2122
return \App::call([$slugController, '__invoke']);
2223
}
2324
$arguments['related'] = $urlObj->related;

src/Models/Url.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Url extends Model
3535
protected static function booted()
3636
{
3737
static::updated(callback: function (Url $url) {
38-
if (!$url->isDirty('slug')) {
38+
if (! $url->isDirty('slug')) {
3939
return;
4040
}
4141
Url::create([
@@ -69,7 +69,7 @@ public function related(): MorphTo
6969
*/
7070
public static function makeSlug(string $slug, Model $model): string
7171
{
72-
if (!$slug) {
72+
if (! $slug) {
7373
throw new Exception('Slug cannot be empty');
7474
}
7575
$where = $model->only(['id', 'type']);

tests/HasUniqueUrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
//uses(RefreshDatabase::class);
99

10-
beforeEach(function() {
10+
beforeEach(function () {
1111
app()->setLocale('en');
1212
});
1313

0 commit comments

Comments
 (0)