Skip to content

feat: Add update and delete functionality to ChirpController

silentmot requested to merge testing into main
  • Added the update method to handle updating a chirp in storage.
  • Added authorization logic to check if the user can update the chirp.
  • Validated the request data before updating the chirp.
  • Updated the destroy method to handle deleting a chirp from storage.
  • Added authorization logic to check if the user can delete the chirp.

fix: Update Chirp model relationship

  • Added a user method that defines a BelongsTo relationship with User model.

feat: Add ChirpPolicy for authorization

  • Created a new file, ChirpPolicy.php, which contains policy methods for determining user permissions on chirps.

chore(deps): Update dayjs dependency version

  • Updated dayjs dependency version in package.json and package-lock.json files.

Merge request reports