Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you reload Boris in Laravel 4.1 without having to exit?

While using php artisan tinker, I changed some class files in my project. Is there a way to reload the REPL without having to type exit and php artisan tinker again?

like image 546
Dave Avatar asked Dec 15 '13 01:12

Dave


1 Answers

If the sequence CTRL+d, up, enter is too long for you, you could file a feature request with laravel, but last time I checked you couldn't Redefine Class Methods or Class , so I think isn't a trivial thing to do.

If tinkering is all you do you could make it even shorter starting your tinker session with

$ while true; do php artisan tinker; done

Now just the CTRL+d will reload the tinker session.

And if that is too much to type you could define a Terminal/iTerm Profile with this command:

/bin/sh -c 'while true; do php artisan tinker; done'
like image 102
Chris Wesseling Avatar answered Nov 11 '22 00:11

Chris Wesseling