DEV Community

Justin Ho
Justin Ho

Posted on • Edited on

1

Blog Backlogged On Day 3

I can finally see why people enjoy using Twitter along their busy lives. Despite enjoying writing long-form content more, I have neglected to post anything on any of my blogs because I prioritized my time onto HypeTracker and work instead.

I am now going to summarize my days along with thoughts about them further along my development (for reference this is day 6 of my challenge at the time of publishing)

Day 3 of 100DaysOfCode

Finished adding mutators and relationships in Laravel using their Eloquent ORM (incorrectly). I have created applications in PHP before but I was too familiar with Object-Oriented Programming languages where more boilerplate classes like Data Access Objects existed.

Laravel provides a lot of implicit conversions based on field and function names which actually saves a lot of scaffolding time. (still not sure how another developer can come into the project and know the Model structure though)

Ended up having to edit my commits a few times on a PR branch and force push haha.

A lot of force pushes on this branch

So the trick to editing previous commits is this git command:

// Replace 'x' with the number of commits prior 
// to current head that you want to edit.
// You can find the number of commits with git log 
// or even replace HEAD with the commit id.

$ git rebase -i HEAD~x
Enter fullscreen mode Exit fullscreen mode

It brings up a list of commits along with instructions for replacing the pick keyword with the action that you want to do (the ones I use most frequently are edit for changing the commit and reword to just change the commit message).

HOWEVER there are dangerous implications to force pushing rebased commits and I would not recommend it unless it's your own branch / has not been pushed publicly. More details here

Because this is a personal / hobby project I just left it in.

Keep up with my journey on Twitter @justinhodev!

Project Repository (PR referenced above):

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more