Get the first record matching the attributes or instantiate it.
public firstOrNew ( array $attributes, array $values = [] ) : |
||
$attributes | array | |
$values | array | |
리턴 |
/** * Get the first record matching the attributes or instantiate it. * * @param array $attributes * @return \Illuminate\Database\Eloquent\Model * @static */ public static function firstOrNew($attributes) { return \Illuminate\Database\Eloquent\Builder::firstOrNew($attributes); }
/** * @param array $attributes * @return \Illuminate\Database\Eloquent\Model */ public function firstOrNew(array $attributes) { return parent::firstOrNew($attributes); }