i am trying to call the function value in suppliers_master_id but its shoving error
my code
public $form = [
'supplier' => '',
'email' => '',
'phone' => '',
'address' => '',
'city' => '',
'state' => '',
'pincode' => '',
'GSTIN' => '',
'suppliers_master_id' => $this->generateRegistrationId()
];
//fuction code
function generateRegistrationId() {
$id = 'SIIT_' . mt_rand(1000000000, 9999999999);
if ($this->registrationIdExists($id)) {
return $this->generateRegistrationId();
}
return $id;
}
function registrationIdExists($id) {
return Supplier::where('suppliers_master_id', $id)->exists();
}
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3eRYhHK
via IFTTT
Aucun commentaire:
Enregistrer un commentaire