mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
46 lines
756 B
PHP
46 lines
756 B
PHP
<?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);
|
|
}
|
|
|
|
/**
|
|
* 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-globe"></i>';
|
|
}
|
|
}
|