/** * 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); }
/** @test */ public function it_can_create_a_new_entity_model() { $attribute = new Attribute(); $this->assertInstanceOf('Cartalyst\\Attributes\\Value', $attribute->newEntityModel()); }