Compare commits

..

No commits in common. "aa820303ec40ad42d41ba98a46c0147a39fd422d" and "ab3611cbce65a9ffba46e598a8120fa48cfda49b" have entirely different histories.

4 changed files with 5 additions and 9 deletions

View File

@ -13,9 +13,7 @@ class Bookmark extends Component
* Create a new component instance. * Create a new component instance.
*/ */
public function __construct( public function __construct(
public ModelsBookmark $bookmark, public ModelsBookmark $bookmark
public bool $showPermalink = true,
public bool $showEdit = true,
) { ) {
// //
} }

View File

@ -4,7 +4,7 @@
<p> <p>
<a href="{{ action('BookmarkController@index') }}">&larr; Back</a> <a href="{{ action('BookmarkController@index') }}">&larr; Back</a>
</p> </p>
<x-bookmark :$bookmark :show-permalink="false" /> <x-bookmark :bookmark="$bookmark" />
<p> <p>
<a href="{{ action('BookmarkController@edit', ['bookmark' => $bookmark]) }}">edit</a> <a href="{{ action('BookmarkController@edit', ['bookmark' => $bookmark]) }}">edit</a>
</p> </p>

View File

@ -1,12 +1,10 @@
<div class="bookmark"> <div class="bookmark">
<p class="bookmark-title"> <p class="bookmark-title">
{{ $bookmark->title }} {{ $bookmark->title }}
@if ($showPermalink) @action('index')
<a href="{{ action('BookmarkController@show', $bookmark) }}">#</a> <a href="{{ action('BookmarkController@show', $bookmark) }}">#</a>
@endif
@if ($showEdit)
<a href="{{ action('BookmarkController@edit', $bookmark) }}">e</a> <a href="{{ action('BookmarkController@edit', $bookmark) }}">e</a>
@endif @endaction
</p> </p>
<p class="bookmark-href"><a href="{{ $bookmark->href }}">{{ $bookmark->href }}</a></p> <p class="bookmark-href"><a href="{{ $bookmark->href }}">{{ $bookmark->href }}</a></p>
@if (!empty($bookmark->description)) @if (!empty($bookmark->description))

View File

@ -6,7 +6,7 @@
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h1><a href="{{ url("/") }}">url snail</a></h1> <h1>url snail</h1>
@yield('content') @yield('content')
</div> </div>
</body> </body>