Laravel Tinker is a powerful REPL for the Laravel framework, powered by the PsySH package. All Laravel applications include Tinker by default. However, you may install Tinker using Composer if you have previously removed it from your application. Tinker allows you to interact with your entire Laravel application on the command line, including your Eloquent models, jobs, events, and more. To enter the Tinker environment, run the tinker Artisan command. You can publish Tinker's configuration file using the vendor:publish command. The dispatch helper function and dispatch method on the Dispatchable class depends on garbage collection to place the job on the queue. Therefore, when using tinker, you should use Bus::dispatch or Queue::push to dispatch jobs. Tinker utilizes an "allow" list to determine which Artisan commands are allowed to be run within its shell. By default, you may run the clear-compiled, down, env, inspire, migrate, optimize, and up commands.

Features

  • All user supplied arguments and options are wrapped in curly braces
  • All of your console commands are registered within your application's App\Console\Kernel class
  • You may assign default values to options by specifying the default value after the option name
  • You may also make arguments optional or define default values for arguments
  • Closure based commands provide an alternative to defining console commands as classes
  • In addition to receiving your command's arguments and options, command closures may also type-hint additional dependencies that you would like resolved out of the service container

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow Laravel Tinker

Laravel Tinker Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Laravel Tinker!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Frameworks

Registered

2021-08-19