phplaraveltinker

Laravel Tinker immediately exits after first command


Whenever I type php artisan tinker, the shell comes up, but whenever I type in any commands and hit the ENTER key, it immediately exits back to the command prompt. Why?

enter image description here


Solution

  • If not already there, try creating a file at ~/.config/psysh/config.php and add the following.

    <?php
    
    return [
      'usePcntl' => false,
    ];
    

    enter image description here