Exemple #1
0
 /**
  * Create a new price.
  *
  * @param  mixed    $attributes
  * @return void
  */
 public function __construct($attributes = [])
 {
     if (is_string($attributes)) {
         $attributes = ['name' => $attributes];
     }
     parent::__construct($attributes);
 }
Exemple #2
0
 /**
  * Create a new resource  instance.
  *
  * @param  mixed $attributes
  */
 public function __construct($attributes = [])
 {
     if (is_scalar($attributes)) {
         $attributes = [$this->getKeyName() => $attributes];
     }
     parent::__construct($attributes);
 }
Exemple #3
0
 /**
  * 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);
 }