*/ protected $fillable = [ 'username', 'password', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', ]; protected $casts = [ 'connected_at' => 'datetime', ]; public $incrementing = false; public function getKeyName() { return 'username'; } public function getIncrementing() { return false; } public static function schema(Blueprint $table) { $table->string('username'); $table->string('password'); $table->timestamp('connected_at')->nullable(); } public function bundles() { return $this->hasMany(Bundle::class); } }