Nafies Luthfi 6 years ago
parent
commit
74a4e03661
  1. 9
      app/Couple.php
  2. 7
      app/User.php

9
app/Couple.php

@ -2,8 +2,8 @@
namespace App; namespace App;
use Ramsey\Uuid\Uuid;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Ramsey\Uuid\Uuid;
class Couple extends Model class Couple extends Model
{ {
@ -14,6 +14,13 @@ class Couple extends Model
*/ */
public $incrementing = false; public $incrementing = false;
/**
* The "type" of the primary key ID.
*
* @var string
*/
protected $keyType = 'string';
public function husband() public function husband()
{ {
return $this->belongsTo(User::class); return $this->belongsTo(User::class);

7
app/User.php

@ -19,6 +19,13 @@ class User extends Authenticatable
public $incrementing = false; public $incrementing = false;
/** /**
* The "type" of the primary key ID.
*
* @var string
*/
protected $keyType = 'string';
/**
* The attributes that are mass assignable. * The attributes that are mass assignable.
* *
* @var array * @var array

Loading…
Cancel
Save