Fix payment form validation, styling and blog header visibility

This commit is contained in:
Muhammet Güler
2026-02-13 12:45:17 +03:00
parent bda19b4b0f
commit 0fa8e4e435
12 changed files with 638 additions and 15 deletions
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Foundation\Auth\User as AuthUser;
use App\Models\Product;
use Illuminate\Auth\Access\HandlesAuthorization;
class ProductPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:Product');
}
public function view(AuthUser $authUser, Product $product): bool
{
return $authUser->can('View:Product');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:Product');
}
public function update(AuthUser $authUser, Product $product): bool
{
return $authUser->can('Update:Product');
}
public function delete(AuthUser $authUser, Product $product): bool
{
return $authUser->can('Delete:Product');
}
public function restore(AuthUser $authUser, Product $product): bool
{
return $authUser->can('Restore:Product');
}
public function forceDelete(AuthUser $authUser, Product $product): bool
{
return $authUser->can('ForceDelete:Product');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:Product');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:Product');
}
public function replicate(AuthUser $authUser, Product $product): bool
{
return $authUser->can('Replicate:Product');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:Product');
}
}