Add Laravel support to CodeRunner (Tinker in CodeRunner).
Install this package globally via Composer.
composer global require stichoza/laravel-coderunner
- Go to CodeRunner preferences.
- Navigate to Languages tab.
- Right-click on
PHP
and select Duplicate. - Name new language
Laravel
. - Write following in the "Run Command" field:
laravel-coderunner $filename
By default, the code is evaluated in default Laravel installation that is provided with this package. Follow this steps if you want to run code in different project:
- Assuming you already have Laravel available in CodeRunner, click "Run Settings..." button right next to Run and Stop buttons.
- Enter path to your project in Arguments field.