Webiondev123's avatar

mkdir():no such file or directory

Hi. I am new here. I have got a job for php developer. Yesterday while trying to create a folder from laravel I started getting this error mkdir(): no such file or directory. I first tried using mkdir() to upload bit then I tried to create a folder using Storage::fileDirectory() or Storage::makeDirectory(). I tried putting in parameters such as base_path and public_path and permission 0777 here is an example

Storage::fileDirectory(public_path, 'Test', 0777);

The error pointa to the file Local.php in vendor where it is using mkdir... I tried changing it to Storage::fileDirectory still same error.

What am I doing wrong?

Thanks

0 likes
2 replies
Snapey's avatar

public_path is a function so you must follow it with parentheses

1 like

Please or to participate in this conversation.