In order to run a custom command from the command line utility called artisan you need to do two things: Create a new CustomCommand file Register that command with artisan Here’s a sample Command file called FooCommand.php which should be placed in app/commands/ Then you’ll need to register that in app/start/artisan.php Now you can run your Read more about Add a command file to Laravel artisan[…]
Typically when Laravel 4 artisan is run from the command line (cli) it uses the production configuration files. This can be changed by using a flag when running the command. However, adding –env-=local each time while running a script can slow down development. I would recommend adding your development environment hostname to the config file. To Read more about How to set local environment as default in command line (CLI) for Larvel 4 artisan[…]
I typically use a library folder in my projects to group of files that you want to use in different projects but don’t want to use Satis to manage the contained files. This folder could also be a helper folder for functions that are static and are mainly generic helpers but don’t quite fit in Read more about How to add a library folder to Laravel 4[…]
After working within a screen session on a CentOS server I had forgotten how to close the screen session that I was done with. It’s a rather simple command. exit Perfect, exit means exit. Of note if you just want to disconnect use. ctrl+a (press) d That’ll disconnect you from the screen session.
I previously posted on setting a static ip address in vmware fusion 4. This also still works for VMWare Fusion 5. Steps are the same. First on your linux vm in terminal run the following command ifconfig Then copy the HWaddr it varies from vm to vm so you need to get yours Link encap:Ethernet Read more about VMWare Fusion 5 Set Static IP Address[…]
Setting up an alias in linux is very easy and very helpful. It allows you to determine a short phrase for running a longer command. Or change a common typo to the command you meant. Here’s an example alias: $ alias lsl=”ls -la” This maps lsl to the command ls -la which is half the Read more about Setup an alias in Linux[…]
I have to do this whenever setting up a new system. Makes the server more secure to disable password based login and only allow ssh keys. To create an ssh key it’s as easy as running one of the two following commands. ssh-keygen -t dsa or ssh-keygen -t rsa The rsa and dsa refer to Read more about Create a new ssh key[…]