<?php namespace App;

use Illuminate\Database\Eloquent\Model;

class CurrencyUnits extends Model {
	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'currency_units';

	/**
	 * The attributes that are mass assignable.
	 *
	 * @var array
	 */
	protected $fillable = ['units','amount'];	

	protected function getAllUnits()
	{
		$result = $this->select('id', 'units', 'amount')->orderBy('id')->get();
		return $result;
	}
}