rohmatmret

Untitled

May 13th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App;
  4.  
  5. use Illuminate\Database\Eloquent\Model;
  6. use Illuminate\Database\Eloquent\SoftDeletes;
  7. use App\aktalahir;
  8. class kartukeluarga extends Model
  9. {
  10.  
  11. // SoftDeletes;
  12. protected $fillable = [
  13. 'kepala_keluarga_id','no_kk','created',
  14. ];
  15.  
  16. //protected $dates=['deleted_at'];
  17. public $timestamps = false;
  18.  
  19.  
  20.  
  21. public function nama()
  22. {
  23. return $this->hasOne('App\aktalahir','id','kepala_keluarga_id');
  24. }
  25.  
  26. public function detail()
  27. {
  28. return $this->hasOne('App\detail_kartukeluarga','kartukeluarga_id','id');
  29. }
  30.  
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment