add types

This commit is contained in:
nurmuhammet committed 2024-05-06 17:13:38 +05:00
1 parent 88b934bda1
commit e5907fe3a9
46 files changed
+465 -184

No files matched your search

@@ -17,6 +17,7 @@
use App\Repos\System\Settings\Legal\PassportRepo;
use App\Repos\System\Settings\Location\RegionRepo;
use App\Rules\OnlyLetters;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
@@ -106,7 +107,7 @@ public static function singularLabel(): string
/**
* Get the text for the create resource button.
*
* @return string|null
* @return string
*/
public static function createButtonLabel(): string
{
@@ -116,7 +117,7 @@ public static function createButtonLabel(): string
/**
* Get the text for the update resource button.
*
* @return string|null
* @return string
*/
public static function updateButtonLabel(): string
{
@@ -129,7 +130,7 @@ public static function updateButtonLabel(): string
* @param \Illuminate\Database\Eloquent\Builder $query
* @return \Illuminate\Database\Eloquent\Builder
*/
public static function indexQuery(NovaRequest $request, $query)
public static function indexQuery(NovaRequest $request, mixed $query): Builder
{
$user = $request->user();
@@ -147,8 +148,8 @@ public static function indexQuery(NovaRequest $request, $query)
/**
* After resource created
*
* @param Laravel\Nova\Http\Requests\NovaRequest $request
* @param Illuminate\Database\Eloquent\Model $model
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
* @param \Illuminate\Database\Eloquent\Model $model
*/
public static function afterCreate(NovaRequest $request, Model $model): void
{
@@ -322,7 +323,7 @@ public function filters(NovaRequest $request)
{
return [
RegionFilter::make()
->canSee(fn () => Gate::allows('isAdmin'), auth()->user()),
->canSee(fn () => Gate::allows('isAdmin', auth()->user())),
new StatusFilter(),
];