Example #1
0
 /**
  * Create a new User model instance.
  *
  * @param array $attributes
  */
 public function __construct(array $attributes = [])
 {
     /*
      * EAV Attributes
      */
     Attribute::firstOrCreate(['slug' => 'gender']);
     Attribute::firstOrCreate(['slug' => 'mobile']);
     // call parent constructor
     parent::__construct($attributes);
 }
Example #2
0
 /** @test */
 public function it_can_create_a_new_entity_model()
 {
     $attribute = new Attribute();
     $this->assertInstanceOf('Cartalyst\\Attributes\\Value', $attribute->newEntityModel());
 }