Home > database >  Can't php artisan serve: failed to open stream: No such file or directory in /home/ on line 21
Can't php artisan serve: failed to open stream: No such file or directory in /home/ on line 21

Time:03-24

I run php artisan tinker

then my vs code become error

I do research an implementing

laravel5: chdir(): No such file or directory (errno 2)

and I was do the required to change code, I was exited, caused my code can do composer update.

but when it start again, it still got the same error.

this is the error

[Thu Mar 24 06:18:27 2022] PHP Fatal error:  require_once(): 
Failed opening required 
'/home/john/Documents/api4/api4/public/index.php' 
(include_path='.:/usr/share/php') in 

/home/john/Documents/api4/api4/server.php on line 21

this is on line 21 at server.php

if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
 }

require_once __DIR__.'/public/index.php' ;

this is the tinker

'alias' => [
    //
],

And about tinker, I still don't know how the functional of that code. I just want to make pop up and learn from page that I open to instruct me do that code.

Have you ever using that code? I mean : php artisan tinker?

hopefully you explain me in simple way and give direction from my problem.

thanks

CodePudding user response:

You have to add vendors directory first by running the install command for the composer:

composer install

After that update your composer packs:

composer update
  • Related