<?php 
namespace App\Models;

use Illuminate\Database\Eloquent\Model;


class Location extends Model {

	protected $table = 'location';

	public static function findcountryname($id){
		$record=Location::find($id);
		if($record){
			return $record->name;
		}
		return "";
	}

	public static function findstatename($id)
	{
		$state= Location::find($id);
		if($state)
		{
			return $state->name;
		}
		return "---";
	}

	public static function locationname($id)
	{
		$name= Location::find($id);
		if($name)
		{
			return $name->name;
		}
		return "---";
	}

	public static function getlocation($id)
	{
		$name= Location::find($id);
		if($name)
		{
			return $name->name;
		}
		return "";
	}

}
