🖤Run Laravel artisan tinker from a Vim buffer with output in Ray

Overview

Tinkeray

Heavily inspired by the absolutely awesome Tinkerwell, run Laravel artisan tinker from a Vim buffer with output in Ray 🖤

Installation

  1. Install using vim-plug or similar:

    Plug 'jesseleite/vim-tinkeray'
  2. Add Tinkeray's mapping to stub and/or open a blank tinkeray.php in your project when you want to tinker:

    nmap t TinkerayOpen
  3. Optionally add tinkeray.php to your global git excludes, so that you don't have to ignore it in each project.

Usage

  1. Install Ray into your project (or check out spatie/global-ray):

    composer require spatie/laravel-ray
  2. Run :TinkerayOpen (or activate the above mentioned mapping) to stub out and/or open a blank tinkeray.php file in your project when you want to tinker.

  3. Open the Ray desktop app.

  4. When you save tinkeray.php, you should see your returned output in Ray.

  5. Order pizza! 🍕 🤘 😎

Laravel Sail

If you are using Laravel Sail, you will also need to add the following to your vim config:

call tinkeray#set_sail()

By default, this will configure Tinkeray to use the default laravel.test Docker service setup by Sail. If you have customized this in your docker file, you may pass your service name into the above set_sail('my-service.test') function.

Thank You!

You might also like...
PHP Parallel Lint - This tool check syntax of PHP files faster than serial check with fancier output
PHP Parallel Lint - This tool check syntax of PHP files faster than serial check with fancier output

PHP Parallel Lint This application checks syntax of PHP files in parallel. It can output in plain text, colored text, json and checksyntax formats. Ad

A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

Laravel SES Tracking Setup the AWS infrastructure to handle email events using SES/SNS and http/s endpoints with a single Laravel artisan command. Thi

A Laravel 9 package that allows you enforce security of your artisan commands by authenticating users before running.

Introduction This package allows you as a developer to restrict who can and cannot run artisan commands, especially in a production environment. For e

A Laravel package which helps you to flush sessions with an artisan command.

A simple laravel Package to flush sessions via artisan command. Sometimes we store data on sessions such as cart data or maybe any information regardi

 Execute Artisan commands on remote servers
Execute Artisan commands on remote servers

Execute Artisan commands on remote servers This package provides a command to execute Artisan command on a remote server. Here's an example that will

Your performance & security consultant, an artisan command away.
Your performance & security consultant, an artisan command away.

Enlightn A Laravel Tool To Boost Your App's Performance & Security Introduction Think of Enlightn as your performance and security consultant. Enlight

Artisan Command for FriendsOfPHP/PHP-CS_Fixer

Laravel PHP CS Fixer The PHP CS Fixer is maintained on GitHub at https://github.com/FriendsOfPHP/PHP-CS-Fixer bug reports and ideas about new features

Refresh artisan commands,table,migrations,models,controllers...

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

λ Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda.
λ Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda.

λ Swoole Runtime for AWS Lambda Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda. Getting started Create your Lambda function index.php ?ph

Comments
  • Make returning a specific statement optional

    Make returning a specific statement optional

    This PR uses AST and a PHP Parser to automatically enforce a return value for the final executed statement in the tinkeray.php file.

    The first explicit return in the file will still take precedence, but if no values are returned, the final statement will fall back to a return call.

    https://user-images.githubusercontent.com/2329654/155303129-092566e1-70cc-40e1-9a56-2f5edd8d162d.mp4

    opened by josecanhelp 0
  • Experiment with dropping Laravel requirement

    Experiment with dropping Laravel requirement

    If tinker is not available, maybe we could require composer's autoloaded stuff and execute ray() through php directly without artisan tinker? This could be handy for non-laravel situations, where you require spatie/ray or spatie/global-ray.

    enhancement 
    opened by jesseleite 0
  • Support external sandbox paths

    Support external sandbox paths

    Support external sandbox paths, say when developing a laravel package. This would run tinker from an external location, while your cwd is open at the plugin repo dir.

    enhancement 
    opened by jesseleite 0
Owner
Jesse Leite
Developer. @Statamic hoser. Vim proselytizer. Xcom commander. Metroid larva. Zelda cucco. Saints cheerleader. Husband & proud father. 1 John 4:19.
Jesse Leite
A circular buffer implementation in PHP

Circular Buffer Installation ?? This is a great place for showing how to install the package, see below: Run $ composer require lctrs/circular-buffer

null 1 Jan 11, 2022
Sources of Big Pile of Vim-like

Sources of Big Pile of Vim-like The site is a list of Vim-like applications and Vim-emulation plugins. And this repository contains a bit of PHP code

xaizek 14 Dec 14, 2022
Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.

Dispatcher Dispatcher allows you to schedule your artisan commands within your Laravel project, eliminating the need to touch the crontab when deployi

Indatus 1.1k Dec 21, 2022
Use Ray in any PHP script without requiring it in your projects.

Global Ray Use Ray in any PHP script without requiring it in your projects. Require this package globally with Composer: composer global require cuyz/

Team CuyZ 26 Jun 5, 2022
Debug with Ray to fix problems faster

Debug with Ray to fix problems faster This package can be installed in any PHP application to send messages to the Ray app. The desktop app: can be us

Spatie 458 Dec 27, 2022
Enable ray(), dd() and dump() in all PHP files on your system

Enable ray(), dd() and dump() in all PHP files on your system Ray is a wonderful desktop application that can help you debug applications faster. It c

Spatie 190 Dec 13, 2022
Run your WP site on github pages, php innovation award winner https://www.phpclasses.org/package/12091-PHP-Make-a-WordPress-site-run-on-GitHub-pages.html

Gitpress Run wordpress directly on github pages Gitpress won the innovation award for may 2021 Read more about this https://naveen17797.github.io/gitp

naveen 13 Nov 18, 2022
Methods to allow the mapping of cases to snake / camel for input / output

Methods to allow the mapping of cases to snake / camel for input / output This is where your description should go. Limit it to a paragraph or two. Co

Craig Smith 4 Aug 31, 2022
This tool check syntax of PHP files faster than serial check with fancier output.

PHP Parallel Lint This application checks syntax of PHP files in parallel. It can output in plain text, colored text, json and checksyntax formats. Ad

PHP Parallel lint 202 Dec 22, 2022
PHPench creates a graphical output for a PHP benchmark

PHPench creates a graphical output for a PHP benchmark. Plot the runtime of any function in realtime with GnuPlot and create an image out of the result.

Matthias 53 Dec 10, 2022