<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class MSRumah extends Model
{
    protected $table = 'ms_rumah';
	protected $primaryKey = 'id';
	
	public function get_project(){
	    return $this->belongsTo('\App\ProjectRumah', 'project_id');
	}
	
	public static function get_rumah($id){
	    return self::find($id);
	}
	
	public static function detailrumah($id){
	    
	    $dt = self::find($id);
	    
	    return $dt->cluster.'/'.$dt->block.'/'.$dt->nomor;
	}
	    
}
