Boilerplate for Listing resource

This commit is contained in:
2025-11-05 02:18:59 -08:00
parent b20e2258b2
commit 8355d57fc4
9 changed files with 276 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Policies;
use App\Models\Listing;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class ListingPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return false;
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Listing $listing): bool
{
return false;
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return false;
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Listing $listing): bool
{
return false;
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Listing $listing): bool
{
return false;
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Listing $listing): bool
{
return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Listing $listing): bool
{
return false;
}
}