Skip to content
Execute PHP code inside your browser (a Laravel 4 Package)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Laraeval Build Status

It is often when developing an application we want to try some code just to figure it out something or test the output. We ended up by creating a bunch of dummy controllers or routes just to test. Introducing Laraeval! a Laravel 4 package for evaluating your PHP code right inside your browser. With Laraeval you can quickly prototyping code that flying around inside your head without having to create a single file. Just fire up your browser and point to Laraeval address and you're ready to go!.

Everybody love screenshot so here are some of Laraeval's screenshots.

Code Editor Window Code Editor Window

Output Window Output Window

Profiler Window Profiler Window

Storage Window Profiler Window


Add laraeval/laraeval as a requirement to composer.json:

    "require": {
        "laraeval/laraeval": "dev-master"

Update composer:

$ php composer.phar update

Add the provider to your app/config/app.php:

'providers' => array(



Publish package assets:

$ php artisan asset:publish laraeval/laraeval

Publish package config:

$ php artisan config:publish laraeval/laraeval


You can access Laraeval with the following URL http://yourhost/index.php/laraeval.

Persistent Storage

Sometime you don't want to lose all your code when browser is closed, refreshed, crashed or anything else. How to do that? Simple, just add parameter storageid=[ID] to the query string when opening Laraeval. You can change [ID] with anything you like. Take a look an example below.


Now even when your browser is closed all your codes is not gone. Laraeval put it into your browser local storage. When you open http://yourhost/index.php/laraeval?storageid=foo for the next time all your previous code will show up again.


You can edit the Laraeval configuration by editing file app/config/packages/laraeval/laraeval/config.php.

  • allowed_ips: List of IP addresses that allowed to access Laraeval.
  • trusted_proxies: List of Proxy IP that need to be trusted by Symfony Request object. This is needed when your application is behind proxy such as load balancer or such things. Use value '*' to trust all IP.
  • localstorage_prefix: Prefix used for saving the content (code) to the browser localstorage object.



There are a lot of improvements that can be made to Laraeval. Feel free to send me a Pull Request.


Laraeval is open source licensed under MIT license.

You can’t perform that action at this time.