|
// TODO: This is Not Standard. Need to find alternative |
Instead of doing Eloquent::unguard(); you can change the code like so:
$employee = new Employee;
$employee->name = $data['name'];
...
try {
$empoyee->save();
} catch (PDOException $e) {
...
}
I feel this also makes it easier to read the code.
laraadmin-crm/app/Http/Controllers/Auth/RegisterController.php
Line 86 in 31b72fc
Instead of doing Eloquent::unguard(); you can change the code like so:
$employee = new Employee;$employee->name = $data['name'];...
try {$empoyee->save();} catch (PDOException $e) {...
}I feel this also makes it easier to read the code.