MY .bash_profile for Laravel

I’ve only started using my .bash_profile a couple of years ago. To be honest I look back now and think, ‘What a plonker, you should have been using since day one’

Why? If you are even a little bit lazy it can save you loads of typing. If you are not lazy it can help you get more done in less time.

For example. Instead of typing

php artisan tinker

I can type

tinker

Still not convinced? How about opening the Apache error log, scroll to the last entry and then automatically scroll down when a new error has been reported?

This

tail -f /usr/local/var/log/apache2/error_log | sed "s/\\\n/^M^L/g"

Becomes this

apachelog

Here is my Lavavel and Lithium .bash_profile, it is not my complete profile but is enough to give you a taste.

#List all including .hidden files

alias ll='ls -la'

#Apache log 

alias apachelog='tail -f /usr/local/var/log/apache2/error_log | sed "s/\\\n/^M^L/g"'

#alias apachelog='tail -f /usr/local/var/log/apache2/error_log | sed "s/\\\n/" | sed "s/\\\n/^M^L/g"'

#PHPSpec

alias phpspec='vendor/bin/phpspec'

#Apache http.conf

alias apacheconfig='open -e /usr/local/etc/apache2/2.4/httpd.conf'

#Apache status

alais apachestatus='ps -aef | grep httpd'

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

export PATH="~/.composer/vendor/bin:$PATH"

#PHP Artisan

alias art='php artisan'

#Laravel PHP  artisan tinker

alias tinker='php artisan tinker'

#Lithium Terminal/console

alias li3='libraries/lithium/console/li3'

#Start Apache and MySQL

function startme(){

        sudo apachectl -k restart

        mysql.sever start

        pwd 

}