123456789101112131415161718192021222324 |
- <?php
-
- namespace App\Model;
-
- use Illuminate\Database\Eloquent\Model;
-
- class Profile extends Model
- {
- //protected $connection = 'connection-name'; //jika menggunakan 2 DB modelnya harus dikasih ini
- //protected $primaryKey = 'your_key_name'; // set primarykeymu jika bukan ID
- protected $table = 'profiles';
- protected $fillable = ['user_id', 'fullname', 'phone_number', 'gender', 'is_have_organization', 'organization_id', 'id_member'];
- //public $incrementing = false; //jika primary keynya string
- //public $timestamps = false; //matiin created_at, updated_at
-
- public function user()
- {
- return $this->belongsTo('App\User');
- }
- public function kd()
- {
- return $this->belongsTo('App\Model\Raharja\KelompokDriver');
- }
- }
|