mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
schedule
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\Country;
|
|||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Livewire\WithFileUploads;
|
use Livewire\WithFileUploads;
|
||||||
use RalphJSmit\Laravel\SEO\Support\SEOData;
|
use RalphJSmit\Laravel\SEO\Support\SEOData;
|
||||||
|
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||||
|
|
||||||
class CommentBookCase extends Component
|
class CommentBookCase extends Component
|
||||||
{
|
{
|
||||||
@@ -45,6 +46,14 @@ class CommentBookCase extends Component
|
|||||||
return to_route('bookCases.comment.bookcase', ['bookCase' => $this->bookCase->id]);
|
return to_route('bookCases.comment.bookcase', ['bookCase' => $this->bookCase->id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deletePhoto($id)
|
||||||
|
{
|
||||||
|
Media::find($id)
|
||||||
|
->delete();
|
||||||
|
|
||||||
|
return to_route('bookCases.comment.bookcase', ['bookCase' => $this->bookCase->id]);
|
||||||
|
}
|
||||||
|
|
||||||
protected function url_to_absolute($url)
|
protected function url_to_absolute($url)
|
||||||
{
|
{
|
||||||
if (str($url)->contains('http')) {
|
if (str($url)->contains('http')) {
|
||||||
|
|||||||
@@ -147,6 +147,14 @@
|
|||||||
<button x-bind="focusableWhenVisible" class="px-4 py-2 text-sm">
|
<button x-bind="focusableWhenVisible" class="px-4 py-2 text-sm">
|
||||||
#{{ $loop->iteration }} Bild
|
#{{ $loop->iteration }} Bild
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@if(auth()->user()->hasRole('super-admin'))
|
||||||
|
<x-button wire:click="deletePhoto({{ $image->id }})" xs
|
||||||
|
x-bind="focusableWhenVisible"
|
||||||
|
class="px-4 py-2 text-sm">
|
||||||
|
Löschen
|
||||||
|
</x-button>
|
||||||
|
@endif
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user