I have a clone function in my livewire show blade , so when a user clone the post , I don't want the clone post to show in the general post view blade
Post::get();
view blade
@foreach($posts as $post)
{{ $post->title }}
@endforeach
``
(
I won't like to have same post in the index
I only want to display the user clone post in there profile
how can I do this livewire components
public function clone($id)
{
$post = Post::find($id);
$newPost = $post->replicate();
$newPost->created_at = Carbon::now();
$newPost->save();
}