add spatie backup tool
This commit is contained in:
1 parent
109a27b0b9
commit
518ad214e6
43 files changed
+2084
-24
No files matched your search
@@ -12,7 +12,6 @@
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
@@ -110,7 +109,7 @@ function sendSMS(string|int $phone, string|int $message): mixed
|
||||
/**
|
||||
* Normalize a Turkmen phone number to the local 8-digit format.
|
||||
*/
|
||||
function normalizeTurkmenPhoneNumber(null|string|int $phone): null|string
|
||||
function normalizeTurkmenPhoneNumber(null|string|int $phone): ?string
|
||||
{
|
||||
if ($phone === null) {
|
||||
return null;
|
||||
@@ -140,7 +139,7 @@ function isOtpBypass(null|string|int $phone, null|string|int $code): bool
|
||||
/**
|
||||
* Send a sms verification code
|
||||
*
|
||||
* @return \App\Models\Verification | null
|
||||
* @return App\Models\Verification | null
|
||||
*/
|
||||
function sendSMSVerification(string|int $phone_number): ?Verification
|
||||
{
|
||||
@@ -219,7 +218,7 @@ function mask_phone(string|int|float $phone): string
|
||||
/**
|
||||
* Default channel
|
||||
*
|
||||
* @return \App\Models\Shop\Channel
|
||||
* @return App\Models\Shop\Channel
|
||||
*/
|
||||
function tmpostChannel(): Channel
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Api\V1\Auth\Register;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AuthRegisterRequest extends FormRequest
|
||||
@@ -19,7 +20,7 @@ protected function prepareForValidation(): void
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Ecommerce\Channel\Channel;
|
||||
use App\Models\Ecommerce\Product\Brand\Brand;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Models\Ecommerce\Product\Category\Category;
|
||||
use App\Models\Ecommerce\Product\Collection\Collection;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class FilterController extends Controller
|
||||
{
|
||||
@@ -39,16 +39,16 @@ private function categories()
|
||||
{
|
||||
if ($this->shouldFilterByCategory()) {
|
||||
return Category::query()
|
||||
->find($this->request->category_id, ['id', 'parent_id'])
|
||||
->children()
|
||||
->where('is_visible', true)
|
||||
->ordered()
|
||||
->get(['id', 'parent_id', 'name'])
|
||||
->map(fn ($category) => [
|
||||
'id' => $category->id,
|
||||
'parent_id' => $category->parent_id,
|
||||
'name' => $category->name,
|
||||
]);
|
||||
->find($this->request->category_id, ['id', 'parent_id'])
|
||||
->children()
|
||||
->where('is_visible', true)
|
||||
->ordered()
|
||||
->get(['id', 'parent_id', 'name'])
|
||||
->map(fn ($category) => [
|
||||
'id' => $category->id,
|
||||
'parent_id' => $category->parent_id,
|
||||
'name' => $category->name,
|
||||
]);
|
||||
}
|
||||
|
||||
if ($this->shouldFilterByCollection()) {
|
||||
@@ -155,7 +155,7 @@ private function categoriesFor(int $id, string $type)
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Brands
|
||||
*/
|
||||
private function categoriesForBrand(int $id)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Requests\Api\V1\Auth;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AuthLoginRequest extends FormRequest
|
||||
@@ -19,7 +20,7 @@ protected function prepareForValidation(): void
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Requests\Api\V1\Auth;
|
||||
|
||||
use App\Rules\VerificationRule;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AuthVerifyRequest extends FormRequest
|
||||
@@ -20,7 +21,7 @@ protected function prepareForValidation(): void
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ public function cards(NovaRequest $request): array
|
||||
public function filters(NovaRequest $request): array
|
||||
{
|
||||
return [
|
||||
new VisableFilter(),
|
||||
new VisableFilter,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
use Laravel\Nova\Menu\MenuSection;
|
||||
use Laravel\Nova\Nova;
|
||||
use Laravel\Nova\NovaApplicationServiceProvider;
|
||||
use Spatie\BackupTool\BackupTool;
|
||||
|
||||
class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
{
|
||||
@@ -119,6 +120,8 @@ public function tools(): array
|
||||
LocaleSwitcher::make()
|
||||
->setLocales(config('app.locales'))
|
||||
->onSwitchLocale(NovaRepo::localeSwitcherSave()),
|
||||
|
||||
new BackupTool,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
use App\Models\Auth\Verification;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Translation\PotentiallyTranslatedString;
|
||||
|
||||
class VerificationRule implements ValidationRule
|
||||
{
|
||||
@@ -21,7 +22,7 @@ public function __construct(protected null|int|string $phone)
|
||||
/**
|
||||
* Run the validation rule.
|
||||
*
|
||||
* @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail
|
||||
* @param Closure(string): PotentiallyTranslatedString $fail
|
||||
*/
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user