diff --git a/app/Models/Prompt/Prompt.php b/app/Models/Prompt/Prompt.php index bd78af27ef..02d44fbc2a 100644 --- a/app/Models/Prompt/Prompt.php +++ b/app/Models/Prompt/Prompt.php @@ -289,6 +289,15 @@ public function getUrlAttribute() { return url('prompts/prompts?name='.$this->name); } + /** + * Gets the URL of the individual prompt's page, by ID. + * + * @return string + */ + public function getIdUrlAttribute() { + return url('prompts/'.$this->id); + } + /** * Gets the prompt's asset type for asset management. * diff --git a/resources/views/prompts/_prompt_entry.blade.php b/resources/views/prompts/_prompt_entry.blade.php index 5f344b2db9..de30c23fef 100644 --- a/resources/views/prompts/_prompt_entry.blade.php +++ b/resources/views/prompts/_prompt_entry.blade.php @@ -6,9 +6,9 @@
@if (isset($isPage)) -

{!! $prompt->name !!}

+

{!! $prompt->name !!}

@else -

{!! $prompt->name !!}

+

{!! $prompt->name !!}

@endif @if ($prompt->prompt_category_id)
Category: {!! $prompt->category->displayName !!}