forked from eatvio/eatvio-infra
added tests for blogPost
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user