<?php namespace App;

use Illuminate\Database\Eloquent\Model;

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

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

	protected function getAllPercents()
	{
		$result = $this->select('id', 'percentage')->orderBy('percentage')->first();
		return $result;
	}
}