invoiceninja/app/Models/ClientContact.php
David Bomba b989cf82b7
Client CRUD with VueJS (#2497)
*  working on js localizations

* remove dependencies

* Pad Hashes to at least 10 characters in length

* Inject JS translations into front end dynamically

* Implement VueJS for Client Edit Page with reactivity

* Conditionally hide rows if not enabled (custom_value)

* Split client template into smaller components

* implementing ui buttons

* CRUD cycles of a client

* Working on Client CRUD - Integrity constraint issues
2018-11-11 00:24:36 +11:00

53 lines
922 B
PHP

<?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);
}
}