暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Profile extends Model
  5. {
  6. //protected $connection = 'connection-name'; //jika menggunakan 2 DB modelnya harus dikasih ini
  7. //protected $primaryKey = 'your_key_name'; // set primarykeymu jika bukan ID
  8. protected $table = 'profiles';
  9. protected $fillable = ['user_id', 'fullname', 'phone_number', 'gender', 'is_have_organization', 'organization_id', 'id_member'];
  10. //public $incrementing = false; //jika primary keynya string
  11. //public $timestamps = false; //matiin created_at, updated_at
  12. public function user()
  13. {
  14. return $this->belongsTo('App\User');
  15. }
  16. public function kd()
  17. {
  18. return $this->belongsTo('App\Model\Raharja\KelompokDriver');
  19. }
  20. }