We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c44217 commit 75407c1Copy full SHA for 75407c1
doc/usage.md
@@ -114,4 +114,16 @@ For api controller:
114
php artisan crud:api-controller Api\\PostsController --crud-name=posts --model-name=Post
115
```
116
117
+### File Upload
118
+If you want to add file on a CRUD just mention the field type as `file` eg. ```--fields='avatar#file;```
119
+
120
+All the files will upload to `storage\app\public\uploads` directory. So you should symbolic the storage dir to public access.
121
+```
122
+php artisan storage:link
123
124
+Get your uploaded file as:
125
+```php
126
+$file = Storage::disk('public')->get('uploads\filename.jpg');
127
128
129
[← Back to index](README.md)
0 commit comments