diff --git a/app/Livewire/Bookmark.php b/app/Livewire/Bookmark.php deleted file mode 100644 index f2e9174..0000000 --- a/app/Livewire/Bookmark.php +++ /dev/null @@ -1,16 +0,0 @@ -bookmark = $bookmark; - } -} diff --git a/app/View/Components/Bookmark.php b/app/View/Components/Bookmark.php new file mode 100644 index 0000000..271cea1 --- /dev/null +++ b/app/View/Components/Bookmark.php @@ -0,0 +1,28 @@ +links() }} @foreach ($bookmarks as $bookmark) - + @endforeach {{ $bookmarks->links() }} diff --git a/resources/views/bookmarks/show.blade.php b/resources/views/bookmarks/show.blade.php index 9f86dae..605ec9d 100644 --- a/resources/views/bookmarks/show.blade.php +++ b/resources/views/bookmarks/show.blade.php @@ -1,8 +1,5 @@ @extends('layouts.app') @section('content') -

- ← Back -

- + @endsection diff --git a/resources/views/livewire/bookmark.blade.php b/resources/views/components/bookmark.blade.php similarity index 78% rename from resources/views/livewire/bookmark.blade.php rename to resources/views/components/bookmark.blade.php index 4956fa4..eaa31e4 100644 --- a/resources/views/livewire/bookmark.blade.php +++ b/resources/views/components/bookmark.blade.php @@ -1,10 +1,5 @@
-

- {{ $bookmark->title }} - @action('index') - # - @endaction -

+

{{ $bookmark->title }}

{{ $bookmark->href }}

@if (!empty($bookmark->description))
diff --git a/routes/web.php b/routes/web.php index 7cd0725..668451c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -3,9 +3,5 @@ use App\Http\Controllers\BookmarkController; use Illuminate\Support\Facades\Route; -Route::get( - '/', function () { - return redirect()->action([BookmarkController::class, 'index']); - } -); -Route::resource('bookmarks', BookmarkController::class); +Route::get('/', [BookmarkController::class, 'index']); +Route::resource('bookmarks', BookmarkController::class)->except(['index']);