All Projects → spatie → Laravel Artisan Dd

spatie / Laravel Artisan Dd

Licence: mit
Quickly run some code via Artisan

Projects that are alternatives of or similar to Laravel Artisan Dd

Laravel Tail
An artisan command to tail your application logs
Stars: ✭ 587 (+331.62%)
Mutual labels:  laravel, artisan, debug
Ray
Debug with Ray to fix problems faster
Stars: ✭ 263 (+93.38%)
Mutual labels:  dump, laravel, debug
Laravel Mailable Test
An artisan command to easily test mailables
Stars: ✭ 143 (+5.15%)
Mutual labels:  laravel, artisan, debug
Laravel Migrate Fresh
An artisan command to build up a database from scratch
Stars: ✭ 179 (+31.62%)
Mutual labels:  laravel, artisan, debug
Laravel Db Snapshots
Quickly dump and load databases
Stars: ✭ 650 (+377.94%)
Mutual labels:  dump, artisan
Laravel Kit
A desktop Laravel admin panel app
Stars: ✭ 440 (+223.53%)
Mutual labels:  laravel, artisan
Laravel Terminal
Runs artisan command in web application
Stars: ✭ 682 (+401.47%)
Mutual labels:  laravel, artisan
Blade Migrations Laravel
An intelligent alternative version of Laravel 5/6 Database Migrations - uses raw-sql syntax, transactions, auto-rollback, UP-DOWN-UP testing
Stars: ✭ 25 (-81.62%)
Mutual labels:  laravel, artisan
Artisan View
👀 Manage your views in Laravel projects through artisan
Stars: ✭ 708 (+420.59%)
Mutual labels:  laravel, artisan
Webshowu
webshowu—laravel开源项目—秀站分类目录源代码
Stars: ✭ 52 (-61.76%)
Mutual labels:  laravel, artisan
Env Providers
👷 Load Laravel service providers based on your application's environment.
Stars: ✭ 73 (-46.32%)
Mutual labels:  laravel, artisan
Scout Extended
Scout Extended: The Full Power of Algolia in Laravel
Stars: ✭ 330 (+142.65%)
Mutual labels:  laravel, artisan
Backup
MySQL Database backup package for Laravel
Stars: ✭ 66 (-51.47%)
Mutual labels:  dump, laravel
Laravel Ng Artisan Generators
Laravel artisan AngularJS generators
Stars: ✭ 91 (-33.09%)
Mutual labels:  laravel, artisan
Laravel Web Tinker
Tinker in your browser
Stars: ✭ 664 (+388.24%)
Mutual labels:  laravel, debug
Generator
Laravel 5.3+ Scaffold Generator, Support both bootstrap and Semantic UI
Stars: ✭ 327 (+140.44%)
Mutual labels:  laravel, artisan
Bugsnag Laravel
Bugsnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
Stars: ✭ 746 (+448.53%)
Mutual labels:  laravel, debug
Generators
Laravel File Generators with config and publishable stubs
Stars: ✭ 102 (-25%)
Mutual labels:  laravel, artisan
var-dumper
Helper for dumping variable for debug purposes
Stars: ✭ 13 (-90.44%)
Mutual labels:  debug, dump
xr
Lightweight debug server utility for PHP.
Stars: ✭ 116 (-14.71%)
Mutual labels:  debug, dump

Quickly dd anything from the commandline

Latest Version on Packagist GitHub Workflow Status Check & fix styling Total Downloads

Laravel's tinker command allows to run any code you want as if you are inside your Laravel app. But if you want to run a single line of code if can be a bit bothersome. You must start up tinker, type the code, press enter, and quit tinker.

This package contains an Artisan command to dd anything from the commandline. No need to start and quit tinker anymore.

# dumps the first user
php artisan dd "User::first()"

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require spatie/laravel-artisan-dd

You must register the Spatie\ArtisanDd\DdCommand in the console kernel.

// app/Console/Kernel.php

protected $commands = [
    ...
    \Spatie\ArtisanDd\DdCommand::class,
];

Usage

You can pass any code you want to execute as the first argument. The result will be dumped to the screen.

php artisan dd "bcrypt('secret')"; 

Multiple pieces of code can be dumped in one go:

php artisan dd "bcrypt('secret')" "bcrypt('another-secret')"; 

Support for short class names

Under the hood registers short class names using our laravel-tinker-tools package. So instead of

php artisan dd "\App\Models\NewsItem::first()"; 

you can do this:

php artisan dd "NewsItem::first()"; 

A word to the wise

This command can run arbitrary code by using PHP's eval. Be aware that this can be potentially dangerous. By default the command will only run in a local environment. You can make it run in other environments by setting an ALLOW_DD_COMMAND enviroment variable to true.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Idea: Sebastian De Deyne

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].