megacommit

This commit is contained in:
2025-02-20 01:41:39 -03:00
parent 091aa09101
commit 234aa6d912
116 changed files with 16520 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Policies;
use App\Models\Receta;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class RecetaPolicy
{
/**
* 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, Receta $receta): 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, Receta $receta): bool
{
return $receta->user()->is($user);
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Receta $receta): bool
{
return $this->update($user, $receta);
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Receta $receta): bool
{
return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Receta $receta): bool
{
return false;
}
}