60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
<?php
|
|
|
|
namespace $NAMESPACE$;
|
|
|
|
use Modules\$MODULE$\Entities\$MODULE$;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class $CLASS$
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
/**
|
|
* Determine whether the user can view any models.
|
|
*/
|
|
public function viewAny($user): bool
|
|
{
|
|
return true; // Adjust based on your authorization logic
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can view the model.
|
|
*/
|
|
public function view($user, $MODULE$ $$LOWER_NAME$): bool
|
|
{
|
|
return true; // Adjust based on your authorization logic
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can create models.
|
|
*/
|
|
public function create($user): bool
|
|
{
|
|
return true; // Adjust based on your authorization logic
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can update the model.
|
|
*/
|
|
public function update($user, $MODULE$ $$LOWER_NAME$): bool
|
|
{
|
|
return true; // Adjust based on your authorization logic
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can delete any model.
|
|
*/
|
|
public function deleteAny($user): bool
|
|
{
|
|
return true; // Adjust based on your authorization logic
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can delete the model.
|
|
*/
|
|
public function delete($user, $MODULE$ $$LOWER_NAME$): bool
|
|
{
|
|
return true; // Adjust based on your authorization logic
|
|
}
|
|
}
|