Adding a Portfolio URL Column to the Post Resource Table
This post details the addition of a portfolio_url column to the PostResource table within the devlog-ist/landing project. The devlog-ist/landing project is responsible for the landing page and related resources.
The Change
A new column, portfolio_url, was added to the PostResource table. This allows associating a URL to a portfolio or external resource related to a specific post.
Implementation
The implementation likely involved a database schema migration to add the new column. Here's a conceptual example of how this might look in a migration script:
ALTER TABLE PostResource
ADD COLUMN portfolio_url VARCHAR(255) NULL;
Additionally, the application's data access layer and potentially the user interface were updated to utilize this new column. For example, the model representing PostResource would need to be updated:
class PostResource extends Model
{
protected $fillable = [
'title',
'content',
'portfolio_url',
];
}
Use Case
This change enables displaying a direct link to a portfolio or related project associated with each post, enhancing the user experience by providing immediate access to relevant external content.