Skip to content

Feature/pinned articles#4

Merged
owlinstack merged 4 commits into
mainfrom
feature/pinned-articles
Jul 10, 2026
Merged

Feature/pinned articles#4
owlinstack merged 4 commits into
mainfrom
feature/pinned-articles

Conversation

@owlinstack

Copy link
Copy Markdown
Owner

Feat: Pinned Articles Management & Code Quality Improvements

Description

This Pull Request introduces the backend logic and database support for pinning up to 10 articles to the top of the homepage feed. It also resolves IDE warnings and enforces project style guidelines.

Key Changes

  • Database Schema:
    • Created a migration to add an indexed boolean is_pinned column to the articles table.
  • Filament Admin Integration:
    • Added a toggle switch in ArticleResource to easily pin/unpin articles.
    • Implemented custom validation rules preventing users from pinning more than 10 articles.
    • Resolved namespace import warnings and refactored the Eloquent query using the query builder (Article::query()->where(...) instead of static call) to eliminate IDE/Intelephense validation warnings.
  • API Response & Testing:
    • Exposed the is_pinned attribute in the JSON Resource outputs.
    • Updated API integration tests and verified test snapshots match the new schema structure.
    • Added test coverage checking for the pinned articles logic.

@owlinstack
owlinstack merged commit 9f7a35e into main Jul 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant