Skip to content

Code suggestion based on TODO comment #7

@machaven

Description

@machaven

// 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions