https://github.com/stichoza/laravel-coderunner
▶️ Add Laravel support to CodeRunner (Tinker in CodeRunner)
https://github.com/stichoza/laravel-coderunner
coderunner laravel laravel-framework laravel-tinker tinker
Last synced: 5 months ago
JSON representation
▶️ Add Laravel support to CodeRunner (Tinker in CodeRunner)
- Host: GitHub
- URL: https://github.com/stichoza/laravel-coderunner
- Owner: Stichoza
- License: mit
- Created: 2020-04-01T23:49:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-04T01:12:25.000Z (almost 2 years ago)
- Last Synced: 2025-01-31T03:31:42.751Z (5 months ago)
- Topics: coderunner, laravel, laravel-framework, laravel-tinker, tinker
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel CodeRunner
[](https://packagist.org/packages/stichoza/laravel-coderunner) [](https://packagist.org/packages/stichoza/laravel-coderunner) [](https://packagist.org/packages/stichoza/laravel-coderunner) [](https://paypal.me/stichoza)Add Laravel support to **[CodeRunner](https://coderunnerapp.com)** (Tinker in CodeRunner).
## Installation
Install this package globally via [Composer](https://getcomposer.org/).
```bash
composer global require stichoza/laravel-coderunner
```
And initialize default laravel app (optional).
```bash
laravel-coderunner install-default
```## Usage
### Add Laravel in CodeRunner langauges
1. Go to CodeRunner preferences.
1. Navigate to Languages tab.
1. Right-click on `PHP` and select Duplicate.
1. Name new language `Laravel`.
1. Write following in the "Run Command" field:```bash
laravel-coderunner $filename
```
> **Note**
> If you have composer installed correctly in your system, [vendor binaries](https://getcomposer.org/doc/articles/vendor-binaries.md) would be already added in your `.profile` or `.bash_profile`. If not, add it to your profile paths, or otherwise go to CodeRunner preferences, navigate to Advanced tab and add binary path (e.g. `/Users/YOUR_USERNAME/.composer/vendor/bin`) to `PATH` shell variable:
### Running in default laravel app
Default laravel app is already installed via `laravel-coderunner install-default` command. If you want to reset the default app, you can run:
```bash
laravel-coderunner reset-default
```### Running in specific project
By default, the code is evaluated in default Laravel installation described above. Follow this steps if you want to run code in different project:1. Assuming you already have Laravel available in CodeRunner, click "Run Settings..." button right next to Run and Stop buttons.
1. Enter **absolute** path to your project in Arguments field.