Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

athamz's avatar

PHP artisan tinker not working

Halo everyone,

I just learned about laravel and try to execute laravel tinker but doesn't work.

I use php 7.3.7 and laravel version 5.8 in mac OS mojave.

How to fix this problem?

Thanks

0 likes
10 replies
Nakov's avatar

@athamz share the command that you are trying and the output/error that you get for better help.

athamz's avatar

I mean there is no output from tinker...press enter but no output.

Nakov's avatar

So running php artisan tinker in your console, you get nothing?

You are not getting this?

Psy Shell v0.9.9 (PHP 7.2.18 — cli) by Justin Hileman
>>>
athamz's avatar

@nakov I was read that solution but I didnt see file ~/.config/psysh/config.php.

how to find that file ?

Nakov's avatar
Nakov
Best Answer
Level 73

@athamz You will not see it, you should create the file yourself as long as you wish to override some of the defaults. This are the steps to take in your terminal:

  • Run:
 vim ~/.config/psysh/config.php
  • When the documents opens press i to enter in insert mode in vim, then paste the following:
<?php

return [
  'usePcntl' => false,
];
  • exit from VIM by pressing esc then type: :wq

Then make sure that you open a new terminal tab, so that you get fresh session and try the tinker again.

4 likes
Nakov's avatar

@athamz you can accept the answer if it solved your issue my friend :) There is a button to mark it as "Best answer"

Please or to participate in this conversation.