PHPackages                             sdbruder/laravel-tinker-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. sdbruder/laravel-tinker-tools

ActiveLibrary[File &amp; Storage](/categories/file-storage)

sdbruder/laravel-tinker-tools
=============================

Use short class names in an Artisan tinker session

1.0.1(8y ago)012MITPHPPHP ^7.0

Since May 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sdbruder/laravel-tinker-tools)[ Packagist](https://packagist.org/packages/sdbruder/laravel-tinker-tools)[ Docs](https://github.com/sdbruder/laravel-tinker-tools)[ RSS](/packages/sdbruder-laravel-tinker-tools/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dc3023f8b511ba8f2e3d80a06550b0dcbec2338466cfcf20a778f988fadd29a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73646272756465722f6c61726176656c2d74696e6b65722d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sdbruder/laravel-tinker-tools)[![Build Status](https://camo.githubusercontent.com/c08a76b8ee50e4f71ba0dd1e285c86ea431e431883843353015cf15c6c650689/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73646272756465722f6c61726176656c2d74696e6b65722d746f6f6c732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/sdbruder/laravel-tinker-tools)[![StyleCI](https://camo.githubusercontent.com/43553dd2b5c4b9b02e7d59b672dd1dbf3a14cffa137816a0138ac580f2944f5d/68747470733a2f2f7374796c6563692e696f2f7265706f732f39313938303439352f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/91980495)[![Quality Score](https://camo.githubusercontent.com/3092cc6fe7e9be2844c479edc3bd6d74e18d2af759c38f2db16206dec3472ee4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73646272756465722f6c61726176656c2d74696e6b65722d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/sdbruder/laravel-tinker-tools)[![Total Downloads](https://camo.githubusercontent.com/2b2707b64e4b0fe5980fc360064b299afd592af91abeba8274b1c6f9a760e264/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73646272756465722f6c61726176656c2d74696e6b65722d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sdbruder/laravel-tinker-tools)

This is a fork
==============

[](#this-is-a-fork)

This a forked version of [spatie/laravel-tinker-tools](https://github.com/spatie/laravel-tinker-tools) to allow older laravel versions (currently tested 5.2-5.4).

Use short class names in an Artisan Tinker session
==================================================

[](#use-short-class-names-in-an-artisan-tinker-session)

When using Artisan's Tinker command it can be quite bothersome having to type the fully qualified classname to do something simple.

```
\App\Models\NewsItem::first();
```

This package contains a class that, when fully installed let's you use the short class names:

```
NewsItem::first();
```

Installation
------------

[](#installation)

First install the package via Composer:

```
composer require sdbruder/laravel-tinker-tools
```

Next, create a file named `.psysh.php` in the root of your Laravel app with this content:

```
