for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Gewaer\Models;
use Gewaer\Traits\SubscriptionPlanLimitTrait;
class UsersInvite extends AbstractModel
{
use SubscriptionPlanLimitTrait;
/**
*
* @var integer
*/
public $id;
* @var string
public $invite_hash;
public $companies_id;
public $role_id;
public $app_id;
public $email;
public $is_deleted;
public $created_at;
public $updated_at;
* Subscription plan key
protected $subscriptionPlanLimitKey = 'users';
* Initialize method for model.
public function initialize()
$this->setSource('users_invite');
$this->belongsTo(
'companies_id',
'Gewaer\Models\Companies',
'id',
['alias' => 'company']
);
'apps_id',
'Gewaer\Models\Apps',
['alias' => 'app']
}
* Returns table name mapped in the model.
* @return string
public function getSource(): string
return 'users_invite';
* What to do after the creation of a new users
* - Assign default role
* @return void
public function afterCreate()
$this->updateAppActivityLimit();