snipe-it/app/Presenters/LocationPresenter.php

50 lines
833 B
PHP
Raw Normal View History

<?php
namespace App\Presenters;
use App\Helpers\Helper;
/**
* Class LocationPresenter
* @package App\Presenters
*/
class LocationPresenter extends Presenter
{
/**
* Link to this locations name
* @return string
*/
public function nameUrl()
{
return (string)link_to_route('locations.show', $this->name, $this->id);
}
2016-12-27 16:24:41 -08:00
/**
* Getter for Polymorphism.
* @return mixed
*/
public function name()
{
return $this->model->name;
}
/**
* Url to view this item.
* @return string
*/
public function viewUrl()
{
return route('locations.show', $this->id);
}
public function glyph()
{
return '<i class="fa fa-map-marker"></i>';
}
public function fullName() {
return $this->name;
}
}