Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pages factory and seeder #29

Merged
merged 4 commits into from
Feb 12, 2025
Merged

Conversation

thejmitchener
Copy link
Member

@thejmitchener thejmitchener commented Feb 12, 2025

Pull Request Description: Update Pages Factory and Seeder

This pull request updates the pages factory and seeder to ensure consistency and clarity in our data model. The primary motivation behind these changes is to replace the ambiguous 'image' field with a more descriptive 'feature_image' field across our codebase. This adjustment enhances the semantic clarity of our data model, making it clear that this field is intended for a prominent visual representation associated with the page.

Key Changes:

  1. Composer Update: The PHP version requirement has been updated to support PHP 8.2 and above, aligning our dependencies with the latest PHP versions and ensuring compatibility with new features and improvements.

  2. Factory Update: The PageFactory has been modified to generate a 'feature_image' instead of 'image'. This aligns the generated data with our intended model structure.

  3. Seeder Update: The PageTableSeeder has also been updated to use 'feature_image', ensuring that the seeded data is consistent with the updated factory and model.

  4. Model Update: The Page model's $fillable property has been updated to include 'feature_image' instead of 'image', and the getDynamicSEOData method now references 'feature_image' for SEO purposes.

Benefits:

  • Improved Clarity: Using 'feature_image' instead of 'image' provides better context for developers and users about the purpose of the field.
  • Data Integrity: Ensures that the data being generated and seeded is consistent with the model's expectations, reducing potential errors during development and production.
  • Future-Proofing: By updating the PHP version requirement, we are ensuring that the project remains compatible with future PHP releases, allowing us to take advantage of new features and improvements.

This update improves the project's data handling, making it more robust and maintainable.

thejmitchener and others added 4 commits February 12, 2025 16:58
Renamed the `image` field to `feature_image` in seeders and factories for improved clarity. Updated `composer.json` to drop support for PHP 8.1, ensuring compatibility with newer versions.
Renamed `image` to `feature_image` for better clarity and added `slug` to the fillable attributes. Adjusted the `getDynamicSEOData` method to reflect these changes. This ensures alignment between database fields and application logic.
@thejmitchener thejmitchener merged commit 1ba1c67 into main Feb 12, 2025
@thejmitchener thejmitchener deleted the update-pages-factory-and-seeder branch February 12, 2025 22:44
fuelviews-app bot pushed a commit that referenced this pull request Feb 12, 2025
* Refactor image field and update PHP version requirements.

Renamed the `image` field to `feature_image` in seeders and factories for improved clarity. Updated `composer.json` to drop support for PHP 8.1, ensuring compatibility with newer versions.

* Update image field and add slug to fillable array

Renamed `image` to `feature_image` for better clarity and added `slug` to the fillable attributes. Adjusted the `getDynamicSEOData` method to reflect these changes. This ensures alignment between database fields and application logic.
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