opnform/app/Policies/TemplatePolicy.php

24 lines
442 B
PHP
Raw Normal View History

2022-11-16 12:12:48 +00:00
<?php
namespace App\Policies;
use App\Models\Template;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class TemplatePolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can create models.
*
* @param \App\Models\User $user
* @return \Illuminate\Auth\Access\Response|bool
*/
public function create(User $user)
{
return $user->template_editor;
}
}