akaunting 3.0 (the last dance)
This commit is contained in:
40
app/Models/Auth/UserInvitation.php
Normal file
40
app/Models/Auth/UserInvitation.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Auth;
|
||||
|
||||
use App\Abstracts\Model;
|
||||
|
||||
class UserInvitation extends Model
|
||||
{
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'user_invitations';
|
||||
|
||||
protected $tenantable = false;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $fillable = ['user_id', 'company_id', 'token'];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Auth\User');
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope a query to only include given token value.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @return void
|
||||
*/
|
||||
public function scopeToken($query, $token)
|
||||
{
|
||||
$query->where('token', $token);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user