added tests for blogPost

This commit is contained in:
2024-01-10 13:41:43 +03:00
parent d96954f4b4
commit 93ca684f67
22 changed files with 548 additions and 28 deletions

View File

@@ -30,7 +30,7 @@ class Edit extends Component
public function mount(BlogPost $blogPost)
{
$this->name = $blogPost->name;
// $this->name = $blogPost->name;
$this->image = $blogPost->image;
$this->state = $blogPost->state;
$this->title = $blogPost->title;
@@ -72,7 +72,7 @@ class Edit extends Component
$this->validate();
$post = $this->blogPost;
/* $post->image = $this->image->store('blog_posts', 'public'); */
$post->image = ! is_string($this->image) ? $this->image->store('blog_posts') : $this->image;
$post->state = $this->state;
$post->title = $this->title;
$post->description = $this->description;