GithubHelp home page GithubHelp logo

laravel-console's People

Contributors

agelxnash avatar ajimix avatar codextends avatar darsain avatar fuhrmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-console's Issues

Broken in 4.2?

When I try to call an Alias from console I get

Execution failed: 404 error

storing snippets

I want to see feature "save/load snippet" in browser local storage. What u think about this?

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?

Code ended unexpectedly

Not sure if I'm doing something wrong here, but even on the simplest of code it gives me output errors and tells me my code ended unexpectedly.

screen shot 2013-11-25 at 7 28 40 pm

Not compatible with Laravel 4.1

The problem when updating to Laravel 4.1

Does the changes of illuminate/support dependency version to 4.1.x will work?

Problem 1
    - darsain/laravel-console dev-master requires illuminate/support 4.0.x -> satisfiable by laravel/framework[4.0.x-dev, v4.0.0, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9], illuminate/support[4.0.x-dev, v4.0.0, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9].
    - darsain/laravel-console dev-master requires illuminate/support 4.0.x -> satisfiable by laravel/framework[4.0.x-dev, v4.0.0, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9], illuminate/support[4.0.x-dev, v4.0.0, v4.0.0-BETA2, v4.0.0-BETA3, v4.0.0-BETA4, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9].
    - don't install illuminate/support 4.0.x-dev|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.0|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.0-BETA2|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.0-BETA3|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.0-BETA4|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.1|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.10|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.2|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.3|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.4|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.5|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.6|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.7|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.8|don't install laravel/framework 4.1.x-dev
    - don't install illuminate/support v4.0.9|don't install laravel/framework 4.1.x-dev
    - Can only install one of: laravel/framework[4.1.x-dev, 4.0.x-dev].
    - Can only install one of: laravel/framework[v4.0.0, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.0-BETA2, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.0-BETA3, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.0-BETA4, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.1, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.10, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.2, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.3, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.4, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.5, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.6, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.7, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.8, 4.1.x-dev].
    - Can only install one of: laravel/framework[v4.0.9, 4.1.x-dev].
    - Can only install one of: laravel/framework[4.1.x-dev, 4.0.x-dev].
    - Installation request for laravel/framework 4.1.* -> satisfiable by laravel/framework[4.1.x-dev].
    - Installation request for darsain/laravel-console dev-master -> satisfiable by darsain/laravel-console[dev-master].

Assets published with the wrong name

After running the setup instructions, the assets folder created is called darsain/laravel-console as you can see in the result of artisan asset:publish

Assets published for package: darsain/laravel-console

But when I go to mydomain.com/console I see that the assets are being loaded from console folder instead of laravel-console so no assets are loaded.

I can easily fix that by renaming the folder but I think it's an issue.

Cannot focus editor

No matter what I try I simply cannot focus editor (and write anything)
Tested with different browsers:
Opera 12.16
Firefox 29.0
Chromium 34.0.1847.116
Chrome 35.0.1916.114
OS: Ubuntu 14.04

Does it require some specific version of flash/java/whatever?

//EDIT:
It seems to be a blade bug, after inspection I found that my compiled partials/head.blade.php looks like this:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Laravel Console</title>
        <meta name="viewport" content="width=device-width">

        <?php echo HTML::style('packages/darsain/laravel-console/css/normalize.css'); ?>
        <?php echo HTML::style('packages/darsain/laravel-console/css/main.css'); ?>
        {{ HTML::style('packages/darsain/laravel-console/css/codemirror.css') }}
        <?php echo HTML::style('packages/darsain/laravel-console/css/laravel.css'); ?>

        <?php echo HTML::script('packages/darsain/laravel-console/js/vendor/modernizr.js'); ?>
    </head>
    <body>

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 :)

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

Handle empty/blank output

Sometimes I hit a situation where the output from code in the console is blank. Whenever this happens I get:

Unhandled Exception

Message:

Undefined offset: -9223372036854775808
Location:

laravel/helpers.php on line 597
Stack Trace:

#0 laravel/laravel.php(42): Laravel\Error::native(8, 'Undefined offse...', '/Users/woodstre...', 597)
#1 laravel/helpers.php(597): Laravel\{closure}(8, 'Undefined offse...', '/Users/woodstre...', 597, Array)
#2 bundles/console/models/console.php(34): get_file_size(0)
#3 bundles/console/controllers/console.php(55): Console::execute('echo '';')
#4 [internal function]: Console_Console_Controller->post_execute()
#5 laravel/routing/controller.php(325): call_user_func_array(Array, Array)
#6 laravel/routing/controller.php(285): Laravel\Routing\Controller->response('execute', Array)
#7 laravel/routing/controller.php(165): Laravel\Routing\Controller->execute('execute', Array)
#8 laravel/routing/route.php(153): Laravel\Routing\Controller::call('console::consol...', Array)
#9 laravel/routing/route.php(124): Laravel\Routing\Route->response()
#10 laravel/laravel.php(167): Laravel\Routing\Route->call()
#11 public/index.php(34): require('/Users/woodstre...')
#12 {main}

Perhaps just show an empty output region, or an "(no output)" message?

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',
));

Tabs (feature request)

I think it would be cool if the console had tabs, I mean like maybe 4 to 8, because sometimes you simply need a second console before you can delete the first.

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

Is there a way I can add profiler to console

Hi Darsain:

Thanks for this bundle. I really like it and always use it when I test model.

I just wondering is there any way I can add Laravel profiler to console, So I can see my query, log, time, etc.

Mark

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

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)

Error handling

Catching all error types in this environment is just a nightmare.

Console needs to catch an error, put it into a profile with:

$profile = Darsain\Console\Console::getProfile(array(
  'error' => $error
));

And return the $profile object as JSON back to the client with 200 Status Code.

I was just not able to accomplish that. Barely kept my legs from breaking from all the logs thrown at them.

Error types to catch and properly handle:

  • Syntax errors.
  • Function/Class missing errors.
  • Thrown exceptions.

The core files responsible for execution are (really simple, just 2 classes with a couple of methods):

How to use with Homestead?

It seems like this can't be used with Homestead. I think that it is because console restricts access only to 127.0.0.1/::1, but I can't find anything about how to edit the config without editing files in the vendor folder. This was working before I was using Homestead.

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}}

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}}

Routes do not work.

I am using Laravel 4.1.* and installed the console.

Routes not working out of the box. I have to copy them to route.php file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.