- PHP version PHP/8.1.10
- Laravel version 9.28.0
While working on a Laravel-admin backend, I tried creating a new user (basically inserting data into admin_user table in the database)
working on my windows computer, I encountered the error:
disk [users] not configured, please add a disk config in
config/filesystems.php.
I revisited the Laravel docs and these are the things I did to solve the problem:
- Opened the config/admin.php and added:
'disk' => 'users',
// Image and file upload path under the disk above.
'directory' => [
'image' => 'images',
'file' => 'files',
],
- Then opened the config/filesystems.php and added:
'users' => [
'driver' => 'local',
'root' => storage_path('app'),
]
- Closed my git bash and reopened it, ran:
php artisan serve
- Accessed the page for creating a user and the error was solved..
Do you know any other way this could be solved?