Skip to content

Commit 566b349

Browse files
committed
5.2.1
1 parent e55a05b commit 566b349

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,5 @@
162162
},
163163
"minimum-stability": "dev",
164164
"prefer-stable": true,
165-
"version": "5.2.0"
165+
"version": "5.2.1"
166166
}

src/NovaApplicationServiceProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ public function boot()
3333
*/
3434
protected function bootAuthentication()
3535
{
36-
$this->gate();
37-
38-
Nova::fortify()->bootstrap();
36+
//
3937
}
4038

4139
/**
@@ -154,6 +152,7 @@ public function register()
154152
$this->fortify();
155153

156154
$this->booted(function () {
155+
$this->gate();
157156
$this->bootAuthentication();
158157
$this->bootRoutes();
159158
});

src/PendingRouteRegistration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public function defaultAuthentication(): bool
188188
*/
189189
public function register()
190190
{
191-
Nova::fortify();
191+
Nova::fortify()->bootstrap();
192192

193193
return $this;
194194
}

src/Query/Search/SearchableText.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SearchableText extends Column
1212
#[\Override]
1313
public function __invoke(Builder $query, string $search, string $connectionType, string $whereOperator = 'orWhere'): Builder
1414
{
15-
if (in_array($connectionType, ['mysql', 'pgsql'])) {
15+
if (in_array($connectionType, ['mariadb', 'mysql', 'pgsql'])) {
1616
$query->{$whereOperator.'FullText'}(
1717
$this->columnName($query), $search
1818
);

src/Resource.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,18 @@ abstract class Resource implements ArrayAccess, JsonSerializable, UrlRoutable
161161
/**
162162
* The pagination per-page options used the resource via relationship.
163163
*
164-
* @var int|null
164+
* @var int
165165
*
166166
* @deprecated use `$perPageViaRelationshipOptions` instead.
167167
*/
168-
public static $perPageViaRelationship = null;
168+
public static $perPageViaRelationship = 5;
169169

170170
/**
171171
* The number of resources to show per page via relationships.
172172
*
173173
* @var int|array<int, int>|null
174174
*/
175-
public static $perPageViaRelationshipOptions = [5];
175+
public static $perPageViaRelationshipOptions = null;
176176

177177
/**
178178
* The cached soft deleting statuses for various resources.
@@ -466,8 +466,12 @@ public static function perPageOptions()
466466
*/
467467
public static function perPageViaRelationshipOptions()
468468
{
469+
if (is_null(static::$perPageViaRelationshipOptions) && is_int(static::$perPageViaRelationship)) {
470+
static::$perPageViaRelationshipOptions = [static::$perPageViaRelationship];
471+
}
472+
469473
return transform(
470-
static::$perPageViaRelationshipOptions ?? static::$perPageViaRelationship ?? null,
474+
static::$perPageViaRelationshipOptions,
471475
static fn ($perPageOptions) => Arr::wrap($perPageOptions),
472476
[5],
473477
);

0 commit comments

Comments
 (0)