package up key generation code and add console command for Laravel