Get the first record matching the attributes or create it.
public static firstOrCreate ( array $attributes ) : |
||
$attributes | array | |
return |
/** * Overrided firstOrCreate method of Model to trim data * * @return object */ public static function firstOrCreate(array $data = array()) { $trimedData = self::trimData($data); return parent::firstOrCreate($trimedData); }