Course Overview
Locked video preview

Paid video

Please purchase the course to watch.

Creating and managing articles

Creating the article form

Here is a summary of the video transcript:

  • Route and Controller Setup
    A new route is created for /admin/articles/new using an admin prefix to reduce repetition. A corresponding controller is added to render the new article page, following the standard web flow: create route, create controller, register route.

  • View Creation and Layout Structure
    A new article page view is defined and wrapped in a base layout. A styled container and form structure are added, using a POST method with a placeholder action endpoint to be implemented later.

  • Reusable Form Components
    Reusable components are introduced, including an input field and a textarea. These accept properties such as name, title, value, and type to support future updates and validation.

  • Article State Selector Component
    A dedicated component is created to handle article state using radio buttons for draft and publish. Conditional logic determines which option is selected, and styling updates dynamically based on the chosen state.

  • Form Completion and Submission Flow
    The form is finalized with fields for title, excerpt, content, state selection, and a submit button. Submission currently routes to a placeholder endpoint, with plans to implement persistence and validation logic in the next step.