for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Gewaer\Models;
class AccessList extends AbstractModel
{
/**
*
* @var string
*/
public $roles_name;
public $resource_name;
public $access_name;
* @var integer
public $allowed;
public $apps_id;
public $created_at;
public $updated_at;
public $is_deleted;
* Initialize method for model.
public function initialize()
$this->setSource('access_list');
$this->belongsTo(
'roles_name',
'Gewaer\Models\Roles',
'name',
['alias' => 'role']
);
}
* Delete all the accest list records for this given role
* @param Roles $role
* @return void
public static function deleteAllByRole(Roles $role): bool
return (bool) self::find('roles_id = ' . $role->getId())->delete();
return (bool)self::find(...ole->getId())->delete()
boolean
void
* Returns table name mapped in the model.
* @return string
public function getSource(): string
return 'access_list';