mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
23 lines
438 B
PHP
23 lines
438 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);
|
|
}
|
|
}
|
|
|
|
|
|
}
|