/**
  * Adds only properties
  *
  * @param Fluent $builder
  */
 public function addProperties(Fluent $builder)
 {
     $builder->bigIncrements('id');
     $builder->string('slug')->unique();
     $builder->string('name');
     $builder->carbonDateTime('createdAt');
     $builder->carbonDateTime('updatedAt');
     $builder->events()->prePersist('onPrePersist')->preUpdate('onPreUpdate');
 }
 /**
  * Load the object's metadata through the Metadata Builder object.
  *
  * @param Fluent $builder
  */
 public function map(Fluent $builder)
 {
     $builder->table('users')->charset('utf8mb4');
     $builder->bigIncrements('id');
     $builder->string('username')->unique();
     $builder->string('email')->unique();
     $builder->string('password');
     $builder->rememberToken();
     $builder->timestamps();
     $builder->softDelete();
 }
Exemple #3
0
 public function map(Fluent $builder)
 {
     $builder->increments('id');
     $builder->string('name');
     $builder->belongsTo(StubEntity::class, 'parent')->inversedBy('parent');
     $builder->hasMany(StubEntity::class, 'children')->mappedBy('parent');
     $builder->hasOne(StubEntity::class, 'one')->ownedBy('theOther');
     $builder->belongsToMany(StubEntity::class, 'many')->owns('theWorld');
 }
 /**
  * Adds only properties
  *
  * @param Fluent $builder
  */
 public function addProperties(Fluent $builder)
 {
     $builder->bigIncrements('id');
     $builder->string('code');
     $builder->boolean('completed');
     $builder->carbonDateTime('completedAt')->nullable();
     $builder->carbonDateTime('createdAt');
     $builder->carbonDateTime('updatedAt');
     $builder->events()->prePersist('onPrePersist')->preUpdate('onPreUpdate');
 }
 /**
  * Adds only properties
  *
  * @param Fluent $builder
  */
 public function addProperties(Fluent $builder)
 {
     $builder->bigIncrements('id');
     $builder->string('username');
     $builder->carbonDateTime('lastLogin')->nullable();
     $builder->carbonDateTime('createdAt');
     $builder->carbonDateTime('updatedAt');
     $builder->events()->prePersist('onPrePersist')->preUpdate('onPreUpdate');
     $builder->embed(ValueObjects\Email::class)->noPrefix();
     $builder->embed(ValueObjects\Name::class)->noPrefix();
     $builder->embed(ValueObjects\Password::class)->noPrefix();
 }
Exemple #6
0
 /**
  * Load the object's metadata through the Metadata Builder object.
  *
  * @param Fluent $builder
  */
 public function map(Fluent $builder)
 {
     $builder->string('hash')->columnName('password');
 }
Exemple #7
0
 /**
  * Load the object's metadata through the Metadata Builder object.
  *
  * @param Fluent $builder
  */
 public function map(Fluent $builder)
 {
     $builder->string('address')->columnName('email')->unique();
 }
Exemple #8
0
 public function map(Fluent $builder)
 {
     $builder->increments('id');
     $builder->string('name');
 }
 /**
  * Adds only properties
  *
  * @param Fluent $builder
  */
 public function addProperties(Fluent $builder)
 {
     $builder->string('name')->primary();
     $builder->boolean('allowed');
 }
Exemple #10
0
 /**
  * Load the object's metadata through the Metadata Builder object.
  *
  * @param Fluent $builder
  */
 public function map(Fluent $builder)
 {
     $builder->string('firstName')->nullable();
     $builder->string('lastName')->nullable();
 }
 /**
  * Load the object's metadata through the Metadata Builder object.
  *
  * @param Fluent $builder
  */
 public function map(Fluent $builder)
 {
     $builder->string('name');
 }