Created
August 7, 2020 16:50
-
-
Save bytefade/34a885737c104d82ef58fa310ca34467 to your computer and use it in GitHub Desktop.
tinker call controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ php artisan tinker | |
Psy Shell v0.10.4 (PHP 7.4.5 — cli) by Justin Hileman | |
>>> $controller = app()->make('path/to/controller'); | |
=> path/to/controller {#4224 | |
+successStatus: 200, | |
+valor: 199, | |
} | |
>>> app()->call([$controller, 'method'], ['variable' => item]); | |
=> null | |
>>> app()->call([$controller, 'method'], ['variable' => 'item']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment