In-browser console for Laravel PHP framework.

Overview

Laravel 4 Console

In-browser console for Laravel 4 PHP framework.

This bundle executes your code within ConsoleController@postExecute context, and displays the produced output.

The purpose is to easily test your stuff without creating garbage routes and controllers just to run something, ... I'm sure you know what I'm talking about :)

This bundle is intended for a local testing, and shouldn't get nowhere near your production servers!

Screenshots

Index Output SQL

Installation

Laravel 4

Add this into require-dev in your composer.json file:

"require-dev" : {
	...
	"darsain/laravel-console": "dev-master"
}

Run an update:

php composer.phar update

Register the console service provider in app/config/app.php:

'providers' => array(
	...
	'Darsain\Console\ConsoleServiceProvider',
);

Then publish the bundle assets:

php artisan asset:publish

And you are done! Open the console in:

yourdomain.com/console

Laravel 3

Laravel 3 version along with installation process can be found in the L3 branch.

Comments
  • Migration/Seeding PDO::quote() expects parameter 1 to be string

    Migration/Seeding PDO::quote() expects parameter 1 to be string

    I get this error when running php artisan migrate:refresh --seed

    {"error":{"type":"ErrorException","message":"PDO::quote() expects parameter 1 to be string, object given","file":"/home/dd/project/vendor/darsain/console/src/models/console.php","line":44}}
    
    opened by newtonianb 9
  • Support for Laravel 4

    Support for Laravel 4

    I haven't actually looked into L4 yet, and dunno when I will (no PHP projects on a horizon for me atm), so if someone can give me a quick write up of how to restructure this for L4, you'd be really helpful :)

    Also, some ideas on how to retain support for L3 without creating a new repo?

    opened by darsain 8
  • Undefined method Console::attach()

    Undefined method Console::attach()

    OSX 10.6.8 Apache 2.2.22 PHP 5.3.15

    When I direct my browser to /console I receive the following exception:

    Unhandled Exception
    
    Message:
    
    Call to undefined method Console::attach()
    
    Location:
    
    /Users/woodstreet/Sites/star-communities/bundles/console/start.php on line 42
    

    To work around this (for the time being), I just mapped the class by hand. So something is going on with Autoloading this class.

    Autoloader::map(array(
        'Console' => Bundle::path('console') . 'models/console.php',
    ));
    
    opened by rk 6
  • Ignore quotes when converting special characters to HTML entities

    Ignore quotes when converting special characters to HTML entities

    Otherwise when you execute this command:

    Role::create( array('name' => 'admin') );
    

    This unreadable SQL log appears:

    insert into "roles" ("name", "updated_at", "created_at") values ('admin', '2013-09-09 13:27:43', '2013-09-09 13:27:43') returning "id"
    
    opened by tortuetorche 5
  • Does not work with Sentry

    Does not work with Sentry

    The login process throws an error with Sentry and Console https://github.com/cartalyst/sentry This error dissapears when you remove this line in your app.php 'Darsain\Console\ConsoleServiceProvider',

    "error":{"type":"ErrorException","message":"PDO::quote() expects parameter 1 to be string, object given","file":"vendor\\darsain\\console\\src\\models\\console.php","line":44}}
    
    opened by newtonianb 5
  • Bug about get_file_size

    Bug about get_file_size

    There is a bug about get_file_size(), the parameter can't be zero. So, if you use

    'output_size'  =>  get_file_size(strlen($output),
    

    to get the output size, it will throw error exception when there is no output. It should be changeed to

    'output_size'  => (strlen($output)) ? get_file_size(strlen($output)) : 0,
    

    I am not sure the bug only happened to me or everybody.

    My php is 5.3.10.

    Mark

    opened by markwu 5
  • Reduce Font Size

    Reduce Font Size

    I would like to reduce the editor (and display) font size if possible. I am sure I can find out where to hack this stuff out (probably in a css somewhere) but just curious if there was an exposed method for doing this?

    If not, I can surely hack around and find out where to do it (heck, maybe even enhance to make this possible for others)

    opened by mikeerickson 4
  • Would it be possible to use filter instead of whitelist?

    Would it be possible to use filter instead of whitelist?

    I understand the reason to have whitelist location, however Scribe bundle for example use filter as an easy authentication middleware to authenticate everything that route to console.

    See https://github.com/daylerees/laravel-scribe

    opened by crynobone 4
  • Standalone package based on this library

    Standalone package based on this library

    Hi I just wanted to notify that some time ago I forked this package and created standalone alternative (standalone means that can be used with any framework or with vanilla PHP). The general functionality and appearance of this application stayed the same, but I improved a lot and added some other functionality. I just released version 1.0.0.

    Link to repository: https://github.com/meebio/php-eval-console

    opened by jan-j 3
  • Error when executing code

    Error when executing code

    When I click execute after entering code, I get this error:

    {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"syntax error, unexpected '\"', expecting T_STRING","file":"\/Users\/user\/www\/project\/vendor\/darsain\/laravel-console\/src\/Darsain\/Console\/Console.php(111) : eval()'d code","line":1}}
    

    After adding stripslashes() to the $code var method before eval(), the error goes away

    I'm running Laravel on MacOS Mavericks, PHP 5.3 on MAMP

    opened by arne-s 3
  • Fix problem when exception is thrown

    Fix problem when exception is thrown

    Currently, when an exception is thrown in the apllication, the current callback does not behave correctly. The issue comes from the Route::currentRouteName call. Changing the if condition fix the problem for me.

    opened by BigfootPlatform 3
  • Deprecate in favor of artisan tinker

    Deprecate in favor of artisan tinker

    When I created this, there was nothing better to use, but now (and apparently some time in L4 too), there is artisan tinker which is a core component of Laravel, and provides the same kind of functionality. You can run code from your app context with all files loaded, you have access to your models, you can run ORM queries...

    With that in mind, I think I'd rather deprecate this project in favor of tinker.

    But, I'm not using Laravel right now, and have no tinker experience, so if there is anyone in here that does, and has a valid reason why this shouldn't be deprecated, speak up :)

    opened by darsain 17
Owner
Hi, this is my old account. I'm @tomasklaen now.
null
Laravel blade directives and php helpers for serverside rendered content, based on browser window size WITHOUT css

Laravel Window Size and Breakpoints Laravel blade directives and php helpers for server side rendered content, based on browser window size WITHOUT cs

Tina Hammar 7 Nov 23, 2022
Laravel blade directives and php helpers for serverside rendered content, based on browser window size WITHOUT css. Requires Livewire and AlpineJS.

Laravel Livewire Window Size and Breakpoints Laravel blade directives and php helpers for server side rendered content, based on browser window size W

Tina Hammar 15 Oct 6, 2022
Mutex for Laravel Console Commands.

Laravel Console Mutex Mutex for Laravel Console Commands. Laravel Console Mutex 8.x 8.x 7.x 7.x 6.x 6.x 5.8.* 5.8.* 5.7.* 5.7.* 5.6.* 5.6.* 5.5.* 5.5.

Dmitry Ivanov 125 Dec 17, 2022
A simple laravel package to validate console commands arguments and options.

Command Validator A simple laravel package to validate console commands arguments and options. Installation Require/Install the package using composer

Touhidur Rahman 20 Jan 20, 2022
A wrapper package to run mysqldump from laravel console commands.

A wrapper package to run mysqldump from laravel console commands.

Yada Khov 24 Jun 24, 2022
Laravel Dusk provides simple end-to-end testing and browser automation.

Introduction Laravel Dusk provides an expressive, easy-to-use browser automation and testing API. By default, Dusk does not require you to install JDK

The Laravel Framework 1.7k Jan 5, 2023
View your Laravel routes on the browser.

View your Laravel routes on the browser. This package adds a route to your Laravel application. Once you've installed this package, enter /route-list

Patompong Savaengsuk 23 Oct 28, 2022
Laravel Abdal Detector - Find info about IP , OS and web browser from your client

Laravel Abdal Detector - Find info about IP , OS and web browser from your client

 Abdal Security Group 1 Mar 24, 2022
Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Jameson Lopp 28 Dec 19, 2022
📝 Artisan Menu - Use Artisan via an elegant console GUI

?? Artisan Menu Use Artisan via an elegant console GUI Features Run built-in and custom Artisan commands from a console GUI Prompts to enter required

Jordan Hall 149 Dec 29, 2022
This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets.

Laravel Nova Search This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets. Requirements laravel-mix v6.0+ php 7.3+

Akki Khare 3 Jul 19, 2022
📝 Artisan Menu - Use Artisan via an elegant console GUI

?? Artisan Menu Use Artisan via an elegant console GUI Features Run built-in and custom Artisan commands from a console GUI Prompts to enter required

Jordan Hall 148 Nov 29, 2022
Intranet Home Page is a highly-configurable self-hosted browser homepage with integrations for public and local data feeds.

Intranet-Home-Page Created in response to personal "dashboards" that are little more than pages with a list of frequently accessed links, Intranet Hom

null 56 Aug 27, 2022
A helper package to flash a bootstrap alert to the browser via a Facade or a helper function.

Alert Box (Laravel) A helper package to flash a bootstrap alert to the browser via a Facade or a helper function. <div class="alert alert-info fade in

Ben-Piet O'Callaghan 17 Dec 30, 2022
File & Folders & Media Browser With Code Editor

Filament Browser File & Folders & Media Browser With Code Editor Features File Browser Code Editor with highlights Media Viewer .Env Editor Screenshot

Fady Mondy 23 Jan 5, 2023
How to get cookies from users' browser and send the information to your email address and telegram bot

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

MAXWELL 3 Dec 3, 2022
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Jan 2, 2023
Framework - 🙃 Phony. Real-like Fake Data Generation Framework

?? Framework This repository contains the ?? Phony Framework. ?? Start generating fake data with ?? Phony Framework, visit the main Phony Repository.

Phonyland 5 Oct 31, 2022
Extend Laravel PHP framework to make working with Aiven databases simpler

Aiven Commands for Laravel ✨ Add some Aiven magic to your Laravel project ✨ This Laravel package provides some aiven commands for artisan to help with

Aiven 8 Aug 19, 2022