Laravel str_ordinal Helper Function

I recently submitted a PR to the Laravel framework to add a str_ordinal helper function. The function adds an ordinal indicator to a numeric value passed to its first argument. Simply put, it adds “st”, “nd”, “rd” and “th” to numbers. The PR was closed by Taylor within the...

Deleting Files with Laravel and PHP

I was perusing the Laracasts forum yesterday when I spotted a thread I recalled seeing a long time ago that someone had resurrected: How to delete a file using Filesystem. The original poster was having an issue using the File facade to delete a file. What followed was...

Laravel Homestead Add Packages After Provisioning

Laravel Homestead offers much of what you’ll need to develop your applications out of the box. However, you may end up with a project that requires software beyond what is installed by default. For shared/universal Homestead, be aware that anything extra you install or configure may affect your projects....

Laravel Forge SSL Obsolete Cipher Suite

Qualsys SSL Test A Plus
If you use Laravel Forge to provision your servers, you probably already know that it can install SSL via Let’s Encrypt. The process is as simple as clicking two buttons–one for the install and a second to activate. However, what Forge fails to mention is you need to add...

Manually Reset WordPress Admin Password

Ever lose or forget your WordPress admin password? Good news, as long as you have access to the database you can reset the password for the admin or any other user easily thanks to the fine folks at Passwordtool.hu. Just visit http://www.passwordtool.hu/wordpress-password-hash-generator-v3-v4 enter a new password then click generate....

MySQL 5.7 Errors Importing Dates 0000-00-00

One of the gotchas for users upgrading to MySQL 5.7 from previous versions is that strict mode is on by default. Thus, if you have dates in a dump file formatted as zeroes (e.g. 0000-00-00), your import will fail because that format is not allowed in in strict mode....

Test Multiple Variables With isset

I caught a Tweet from Taylor Otwell referencing a PR on the Laravel framework where he and others including myself were surprised to learn you can pass multiple variables to php’s isset function. Instead of: You can simply do: I think this is a reflection of the fact we...

Laravel No Supported Encrypter Found

When you create a new laravel project using composer create-project laravel/laravel, composer will generate an app key for your app after renaming .env.example to .env and write it as the value for APP_KEY. IF you install by another means, this key may not get generated and you will get the...