mirror of
https://github.com/snipe/snipe-it.git
synced 2026-04-04 14:58:27 +00:00
19 lines
423 B
PHP
19 lines
423 B
PHP
<?php
|
|
|
|
namespace App\Presenters;
|
|
|
|
/**
|
|
* Class CustomFieldsetPresenter
|
|
*/
|
|
class CustomFieldsetPresenter extends Presenter
|
|
{
|
|
public function nameUrl()
|
|
{
|
|
if (auth()->user()->can('view', ['\App\Models\CustomFieldset', $this])) {
|
|
return '<a href="'.route('fieldsets.show', $this->id).'">'.e($this->display_name).'</a>';
|
|
} else {
|
|
return e($this->display_name);
|
|
}
|
|
}
|
|
}
|