/** * Create a new price. * * @param mixed $attributes * @return void */ public function __construct($attributes = []) { if (is_string($attributes)) { $attributes = ['name' => $attributes]; } parent::__construct($attributes); }
/** * Create a new resource instance. * * @param mixed $attributes */ public function __construct($attributes = []) { if (is_scalar($attributes)) { $attributes = [$this->getKeyName() => $attributes]; } parent::__construct($attributes); }
/** * Create a new price. * * @param mixed $attributes * @return void */ public function __construct($attributes = []) { if (is_string($attributes)) { $attributes = ['address' => $attributes]; } if (!Application::isMexico()) { $this->fillable = array_slice($this->fillable, 0, 2, true); } parent::__construct($attributes); }