All Projects → furey → Tinx

furey / Tinx

⛔️ Laravel Tinx is archived and no longer maintained.

Projects that are alternatives of or similar to Tinx

Terraintoolsamples
Unity has archived the TerrainToolSamples repository. For future development, please use the Terrain Tools package.
Stars: ✭ 195 (-55.38%)
Mutual labels:  deprecated, archived, obsolete
react-native-apple-sign-in
Apple Signin for your React Native applications
Stars: ✭ 16 (-96.34%)
Mutual labels:  deprecated, archived, obsolete
Sphero Ios Sdk
🚫 DEPRECATED: Sphero™ is the amazing robotic ball ( sphero.com ) created by Orbotix, this is the repository for the iOS SDK for Sphero™. Visit dev site for more information:
Stars: ✭ 232 (-46.91%)
Mutual labels:  deprecated, archived, obsolete
Piranha
[DEPRECATED] This is the legacy version of Piranha CMS for .NET 4.5, MVC 5.2 & WebPages 3.2.
Stars: ✭ 418 (-4.35%)
Mutual labels:  deprecated, archived, obsolete
VRTK.Prefabs
*Deprecated* - A collection of productive prefabs for rapidly building spatial computing solutions in the Unity software.
Stars: ✭ 61 (-86.04%)
Mutual labels:  deprecated, archived, obsolete
Sphero Android Sdk
🚫 DEPRECATED REPO: Sphero™ is the amazing robotic ball ( gosphero.com ), this is the repository for the Android SDK for Sphero™. Visit dev site for more information:
Stars: ✭ 160 (-63.39%)
Mutual labels:  deprecated, archived, obsolete
QR
DEPRECATED The bookmarklet and extensions generate QRCode of the current URL for viewing on mobile devices (Google Chrome/Mozilla Firefox/Opera/Safari)
Stars: ✭ 20 (-95.42%)
Mutual labels:  deprecated, archived, obsolete
Closure Linter
Automatically exported from code.google.com/p/closure-linter
Stars: ✭ 104 (-76.2%)
Mutual labels:  deprecated, archived, obsolete
ionic-3D-card-carousel
DEPRECATED Sample project that shows an experimental 3D card carousel in Ionic.
Stars: ✭ 29 (-93.36%)
Mutual labels:  deprecated, archived, obsolete
jest-badges-readme
Creates a group of coverage badges from Jest into your README
Stars: ✭ 30 (-93.14%)
Mutual labels:  deprecated, archived, obsolete
Sphero-AR-SDK
🚫 DEPRECATED: Sphero's augmented reality SDK
Stars: ✭ 46 (-89.47%)
Mutual labels:  deprecated, archived, obsolete
Sphero.js
🚫 DEPRECATED: The Sphero JavaScript SDK to control Sphero robots.
Stars: ✭ 346 (-20.82%)
Mutual labels:  deprecated, archived, obsolete
Python Firebase
⛔️ [DEPRECATED] python wrapper for Firebase's REST API
Stars: ✭ 117 (-73.23%)
Mutual labels:  deprecated, archived, obsolete
AASecondaryScreen
[Deprecated] · Approachable implementation of iOS AirPlay-Mirroring using Swift.
Stars: ✭ 40 (-90.85%)
Mutual labels:  deprecated, archived, obsolete
Codeigniter Base Controller
⛔️DEPRECATED CodeIgniter base controller with view autoloading and layout support
Stars: ✭ 115 (-73.68%)
Mutual labels:  deprecated, archived, obsolete
microsoft-teams-faqplusplus-app
DEPRECATED - This repository contains a deprecated version of the FAQ Plus app template. Please see the README file for more details and a link to the new repository
Stars: ✭ 47 (-89.24%)
Mutual labels:  deprecated, archived, obsolete
Julian
⛔️DEPRECATED Brilliantly clever PHP calendar class
Stars: ✭ 89 (-79.63%)
Mutual labels:  deprecated, archived, obsolete
Secretary
DEPRECATED Secrets management for dynamic environments
Stars: ✭ 93 (-78.72%)
Mutual labels:  deprecated, archived, obsolete
Sphero-Win-SDK
🚫 DEPRECATED: Sphero SDK for Win 8.1+ using RFCOMM
Stars: ✭ 36 (-91.76%)
Mutual labels:  deprecated, archived, obsolete
Azure-AppServices-Diagnostics
Azure App Service Diagnostics provides developers ability to write various diagnostics features which helps customers to diagnose and troubleshoot their applications hosted on app services.
Stars: ✭ 42 (-90.39%)
Mutual labels:  deprecated, archived, obsolete

⛔️ Laravel Tinx (Deprecated)

No Maintenance Intended

Laravel Tinx was archived on 12th December 2019 and is no longer maintained.

Looking for a reloadable version of Laravel Tinker?

Save the following script as tinx.sh to your project root directory:

#!/bin/sh
while true; do php artisan tinker; done

Run the script to launch a reloadable version of Tinker:

$ . tinx.sh

While your Tinker session is running, press:

  • Ctrl + D from an empty prompt to reload your session
  • Ctrl + C to exit your session

Can't see newly created classes in Tinker?

Exit your Tinker session and run:

$ composer dump -o

Thanks for loving Laravel, and thanks for digging Tinx.

Happy coding!

🤓👋


Laravel Tinx

Laravel Tinker, re()loaded.

Reload your session from inside Tinker, plus magic shortcuts for first(), find(), where(), and more!

Contents

Installation

To install Tinx, simply require it via Composer:

composer require --dev ajthinking/tinx

If using Laravel <=5.4, register Tinx's service provider in config/app.php (Laravel >=5.5 does this automatically):

<?php

// 'config/app.php'

return [
    // etc…
    'providers' => [
        // etc…
        Ajthinking\Tinx\TinxServiceProvider::class,
        // etc…
    ],
    // etc…
];

Usage

From the command line, instead of running php artisan tinker, run:

php artisan tinx

Reload your Tinker session

To reboot your current session, simply call:

re()

This will allow you to immediately test out your application's code changes.

Aliases: reboot(), reload(), restart().

To regenerate Composer's optimized autoload files before rebooting your current session, call:

reo()

Calling reo() simply runs composer dump -o before re(), ensuring any new classes added to your codebase since starting Tinx are automatically aliasable/resolvable by Laravel Tinker.

Magic models

Tinx sniffs your models and prepares the following shortcuts:

Example Shortcut Equals
$u App\User::first()
$u_ App\User::latest()->first()
$c App\Models\Car::first()
u(3) App\User::find(3)
u("gmail") Where "%gmail%" is found in any column.
u("mail", "[email protected]") App\User::where("mail", "[email protected]")->get()
u("id", ">", 0) App\User::where("id", ">", 0)->get()
u() "App\User"
u()::whereRaw(...) App\User::whereRaw(...) // Note: >= PHP 7.0 only

Naming strategy

Tinx calculates shortcut names via the implementation defined by your strategy config value.

Lets say you have two models: Car and Crocodile.

If your naming strategy was set to pascal (default), Tinx would define the following shortcuts in your session:

  • Car: $c, $c_, c()
  • Crocodile: $cr, $cr_, cr()

Names

The shortcuts defined for your session will display when Tinx loads and on subsequent reloads.

To see your shortcuts at any time during your session, run:

names()

Your shortcuts will initially display only if your session satisfies the names_table_limit config value.

To filter the shortcuts returned by names(), simply pass your filter terms like so:

names('car', 'user')

Fast factories

Shortcut methods are a great way to create factory models fast.

// Instead of this…
factory(App\User::class)->create()

// …try substituting a shortcut method, like this:
factory(u())->create()

When tinkering, every keystroke counts!

Configuration

Tinx contains a number of helpful configuration options.

To personalise your Tinx installation, publish its config file by running:

php artisan vendor:publish --provider=Ajthinking\\Tinx\\TinxServiceProvider --force

Once published, edit config/tinx.php where appropriate to suit your needs:

<?php

// 'config/tinx.php'

return [

    /**
     * Base paths to search for models (paths ending in '*' search recursively).
     * */
    'model_paths' => [
        '/app',
        '/app/Models/*',
        // '/also/search/this/directory',
        // '/also/search/this/directory/recursively/*',
    ],

    /**
     * Only define these models (all other models will be ignored).
     * */
    'only' => [
        // 'App\OnlyThisModel',
        // 'App\AlsoOnlyThisModel',
    ],

    /**
     * Ignore these models.
     * */
    'except' => [
        // 'App\IgnoreThisModel',
        // 'App\AlsoIgnoreThisModel',
    ],

    /**
     * Model shortcut naming strategy (e.g. 'App\User' = '$u', '$u_', 'u()').
     * Supported values: 'pascal', 'shortestUnique'
     * */
    'strategy' => 'pascal',
    /**
     * Alternatively, you may pass a resolvable fully qualified class name
     * implementing 'Ajthinking\Tinx\Naming\Strategy'.
     * */
    // 'strategy' => App\CustomNamingStrategy::class,

    /**
     * Column name (e.g. 'id', 'created_at') used to determine last model shortcut (i.e. '$u_').
     * */
    'latest_column' => 'created_at',

    /**
     * If true, models without database tables will also have shortcuts defined.
     * */
    'tableless_models' => false,

    /**
     * Include these file(s) before starting tinker.
     * */
    'include' => [
        // '/include/this/file.php',
        // '/also/include/this/file.php',
    ],

    /**
     * Show the console 'Class/Shortcuts' table for up to this many model names, otherwise, hide it.
     * To always view the 'Class/Shortcuts' table regardless of the model name count,
     * pass a 'verbose' flag when booting Tinx (e.g. "php artisan tinx -v"),
     * or set this value to '-1'.
     * */
    'names_table_limit' => 10,

];

Contributing

Please post issues and send PRs.

License

MIT

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].