1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 08:51:34 +02:00
invoiceninja/app/Models/ClientContact.php

53 lines
922 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Hashids\Hashids;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class ClientContact extends Authenticatable
{
use Notifiable;
protected $guard = 'contact';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'first_name',
'last_name',
'email',
'password',
'phone',
'custom_value1',
'custom_value2',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
public function client()
{
$this->hasOne(Client::class);
}
public function primary_contact()
{
$this->where('is_primary', true);
}
}