<?php
namespace Komma\Routes;
class RouteRepository
{
/**
* @var Route
*/
private $route;
/**
* @param Route $route
*/
public function __construct(Route $route)
{
$this->route = $route;
}
public function all()
{
return $this->route
->orderBy('route','desc')
->get();
}
public function getHome()
{
return $this->route
->where('id',1)
->first();
}
}