Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates the Blog module’s seeded content and routing behavior to support a new post about Saucebase 2.0’s dual-framework approach, while also reorganizing cover image paths used during seeding.
Changes:
- Add a new seeded post (“Vue or React? What about both!”) with corresponding HTML content.
- Update seeded cover image paths in
BlogDatabaseSeederto usemodules/blog/images/.... - Adjust
BlogController::show()so/blog/{slug}resolves posts by slug regardless of whether they have a category.
Reviewed changes
Copilot reviewed 3 out of 9 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Http/Controllers/BlogController.php |
Broadens /blog/{slug} resolution to find posts by slug without requiring category_id to be null. |
database/seeders/BlogDatabaseSeeder.php |
Adds the new seeded post and refactors cover image paths to the new directory structure. |
database/seeders/content/post-7-vue-and-react.html |
Introduces the new post’s HTML content used by the seeder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $post = $query->where('category_id', $category->id)->where('slug', $slug)->firstOrFail(); | ||
| } else { | ||
| $post = $query->where('slug', $categoryOrSlug)->whereNull('category_id')->firstOrFail(); | ||
| $post = $query->where('slug', $categoryOrSlug)->firstOrFail(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the blog seeding and content to support a new post about Saucebase 2.0's dual frontend framework support, and improves image path organization. The most important changes are the addition of a new blog post and content, refactoring of image paths, and a minor adjustment to blog post lookup logic.
Blog post and content additions:
BlogDatabaseSeeder, with associated cover image and content file (post-7-vue-and-react.html). [1] [2]Image path organization:
BlogDatabaseSeeder.phpto use themodules/blog/images/directory instead ofimages/blog/, improving image organization. [1] [2] [3] [4] [5]Blog post lookup logic:
BlogControllerso that uncategorized blog post lookups no longer requirecategory_idto be null, allowing posts with or without a category to be found by slug.