📐Use
Last updated
use TomatoPHP\TomatoCrm\Facades\TomatoCrm;
public function boot()
{
TomatoCrm::validation(
create: [
'email' => 'unique:accounts,email',
'type_id' => 'required|integer|exists:types,id',
],
edit: [
'email' => 'sometimes|unique:accounts,email',
'type_id' => 'sometimes|integer|exists:types,id',
],
api_create: [
'email' => 'unique:accounts,email',
'type_id' => 'required|integer|exists:types,id',
],
api_edit: [
'email' => 'sometimes|unique:accounts,email',
'type_id' => 'sometimes|integer|exists:types,id',
]
);
}
use TomatoPHP\TomatoCrm\Facades\TomatoCrm;
public function boot()
{
TomatoCrm::attach(
key: 'birthday',
label: __('Birthday'),
type: 'date',
show_on_create: false,
show_on_edit: false
);
}php artisan vendor:publish --tag=tomato-crm-model