Skip to content

Commit

Permalink
Long data fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Aug 9, 2024
1 parent 4bbeb22 commit fd8c8c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Livewire/BlogMaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public function saveBlog(): mixed
if (Str::contains($e->getMessage(), 'blogs_slug_unique')) {
return redirect()->route('blog.create')->with('error', 'Blog with this title already exists');
}
if (Str::contains($e->getMessage(), '1406')) {
return redirect()->route('blog.create')->with('error', 'Content too long, please reduce the content');
}
return redirect()->route('blog.create' )->with('error', 'Failed to create blog' . $e->getMessage());
}

Expand Down

0 comments on commit fd8c8c2

Please sign in to comment.