Laravel – How To Fix Wrong Domain in Queue Jobs

There is a tricky problem that happens when queued job tries to get the URL (via URL helper or from config) – it doesn’t seem to “notice” the .env / config app.url setting.

The reason is that somehow the queue worker misses the current environment name (might only happen if it is managed system wide via upstart or similar service).

The solution would be to include the –env flag when running queue worker like that: Continue reading

Recover Linux Dual Boot after update to Windows 10

Here’s the problem: I dual boot Windows 7 and Ubuntu 14.04, after deciding to upgrade Windows to 10, I ended up with upgrade partially finished and GRUB going into rescue mode.

That means that Windows messed up GRUB and possibly corrupted Linux’s partition. Here are basic steps I had to take to recover Linux + Windows dual boot (make sure you have a live USB to boot from): Continue reading

Laravel Goodies

Here’s the list of packages that make Laravel development even easier.

Development

PHPUnit – require-dev or require in composer.json

"phpunit/phpunit": "~4.0" 

and then run tests in cli directly from installed binary:

vendor/bin/phpunit

PHPSpec – require-dev or require in composer.json

"phpspec/phpspec": "~2.1" 

and then similar to PHPUnit, run the tests using binary in vendor/bin

vendor/bin/phpspec desc App/Test

Profiling / debugginglaravel-debugbar

IDE auto-completion / PHPDoclaravel-ide-helper

Faker – use to seed Database with realistic Data.
require-dev or require in composer.json

"fzaninotto/faker": "1.4.*@dev"

and then just get an instance

$faker = Faker\Factory::create(); 

and use it to fake just about anything.
Continue reading