Copying Font Awesome Fonts with Laravel Elixir

For some reason, I always have trouble setting up Font Awesome (quickly) with Laravel & Elixir. It’s three easy steps. Pull in font-awesome with npm or yarn Import Font Awesome’s stylesheets in your app.scss file Copy Font Awesome’s font files to your public directory Configure Elixir to do this automatically for you in your gulpfile: This… Continue reading Copying Font Awesome Fonts with Laravel Elixir

The Perfect Staging Environment

I created a staging environment that I’m proud of, and I’d like to share it with you. I wanted my staging environment to accomplish two things: Always show the latest version of the project Be automatically populated with dummy data Edit: The “dummy data” strategy described below works great for small projects. For medium to large… Continue reading The Perfect Staging Environment

Refactoring Advanced Eloquent Filters To Collections

Amo Chohan wrote a very good article detailing a technique he uses to clean up controllers when dealing with complex search queries in eloquent. I’m also enjoying Adam Wathan‘s latest release: Refactoring to Collections – a read guaranteed to make you smarter. Amo really nailed the functionality here – but I think the final class… Continue reading Refactoring Advanced Eloquent Filters To Collections

Logging Guzzle Requests

When you’re building an API consumer, you should log your API requests and responses. Otherwise it can feel like you’re working blind. Here I’ll explain how to configure a Guzzle Middleware to log requests to a file. This is useful for debugging and historical purposes. The way to do this is to pass a new HandlerStack with our logging middleware… Continue reading Logging Guzzle Requests

Don’t Build Salmon Cannons

Today I learned about Salmon Cannons. Salmon have evolved to swim up river to spawn, but the introduction of dams has created a sometimes impossible obstacle for salmon to overcome. A clever solution has been found in the way of the Salmon Cannon – a slippery tube that sucks salmon over obstacles so that they can… Continue reading Don’t Build Salmon Cannons