Adding PHP extensions to Heroku

Use of undefined constant FTP_BINARY

Another wild goose chase. PHP 7 does not come with it’s ftp extension enabled by default. Typically you’d uncomment the line “extension=ftp.so” in the php.ini file. However, Heroku doesn’t support php.ini. In their docs, Heroku asks users to add a “.user.ini” file. Which didn’t work for me and some other folks who write blogs. Even … Read more

Laravel Error 419 Session Expired On Post Requests

Laravel's default 419 error page

Clear your cache Getting a 419 error on login or posts requests? The first step is to check the cache and clear it. From your terminal, you can run. This is common during local development from constantly changing configurations. Check CSRF verification. Laravel automatically generates a CSRF “token” for each active user session managed by … Read more

Reaching the Memory Limit Running Laravel Valet

php memory limit ini file

If you ever get this error “PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted ” while running Laravel Valet, check out the path below for Mac users. It seems that this is the specific memory-limit ini file that Valet uses, and you can edit the memory limits there. /usr/local/etc/php/7.0/conf.d/php-memory-limits.ini Note that 7.0 is the … Read more

Npm How to Reinstall Node Modules Packages (package.json)

Sometimes you need to reset node modules package, a common method to clear out any potential errors. Use the following command in the terminal to remove the folder and contents and reinstall packages. You can also do npm update instead of the above, but this will not work if there are no new packages.

How to add composer vendor bin directory to path

Here’s how to add composer vendor bin directory to your path so you can call composer from your terminal. Go to  ~/.bash_profile Add the following to your ~/.bash_profile (Mac OS users) or into your ~/.bashrc (Linux users). You can use any text editor to add this line to the file or create a new “.bash_profile” … Read more

Laravel CRUD API and Vue Front End

Demo Link: http://phpstack-238576-836634.cloudwaysapps.com/ GitHub Link: https://github.com/BlackDeer/laravel-crud-api I made a Laravel CRUD API using Laravel Resources. It does basic blog CRUD functions with a Vue front end. Cool.

Laravel Nginx and MySQL with Docker

Handy guide from Digital Ocean on how to set up the three containers. The only discrepancy I found was that nano wasn’t included in the containers, so you’ll have to use vim instead. https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose