Skip to content

Commit

Permalink
remove browse and browse multiple from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Nov 19, 2024
1 parent f20b881 commit 8ed8018
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 82 deletions.
33 changes: 0 additions & 33 deletions 7.x-dev/crud-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -983,39 +983,6 @@ Show a thumbnail image stored in the db column as `base64` image string.

<hr>

<a name="browse"></a>
### browse <span class="badge badge-pill badge-info">PRO</span>

Show link to the selected file.

```php
[
'name' => 'browse',
'type' => 'browse',
'label' => 'Browse',
],
```

<hr>

<a name="browse_multiple"></a>
### browse_multiple <span class="badge badge-pill badge-info">PRO</span>

The ```browse_multiple``` column will output a list of files and links, when used on an attribute that stores a JSON array of file paths. It is meant to be used inside the show functionality (not list, though it also works there), to preview files uploaded with the ```browse_multiple``` field type.

Its definition is very similar to the [browse_multiple *field type*](/docs/{{version}}/crud-fields#browse_multiple-pro).

```php
[
'name' => 'photos',
'label' => 'Photos',
'type' => 'browse_multiple',
// 'disk' => 'public', // filesystem disk if you're using S3 or something custom
],
```

<hr>

<a name="ckeditor"></a>
### ckeditor <span class="badge badge-pill badge-info">PRO</span>

Expand Down
49 changes: 0 additions & 49 deletions 7.x-dev/crud-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -1160,55 +1160,6 @@ Input preview:

<hr>

<a name="browse"></a>
### browse <span class="badge badge-pill badge-info">PRO</span>

This button allows the admin to open [elFinder](http://elfinder.org/) and select a file from there. Run ```composer require backpack/filemanager && php artisan backpack:filemanager:install``` to install [FileManager](https://github.com/laravel-backpack/filemanager), then you can use the field:

```php
CRUD::field([ // Browse
'name' => 'image',
'label' => 'Image',
'type' => 'browse'
]);
```


Input preview:

![CRUD Field - browse](https://backpackforlaravel.com/uploads/docs-4-2/fields/browse.png)

Onclick preview:

![CRUD Field - browse popup](https://backpackforlaravel.com/uploads/docs-4-2/fields/browse_popup.png)

<hr>

<a name="browse-multiple"></a>
### browse_multiple <span class="badge badge-pill badge-info">PRO</span>

Open elFinder and select multiple files from there. Run ```composer require backpack/filemanager && php artisan backpack:filemanager:install``` to install [FileManager](https://github.com/laravel-backpack/filemanager), then you can use the field:

```php
CRUD::field([ // Browse multiple
'name' => 'files',
'label' => 'Files',
'type' => 'browse_multiple',
// 'multiple' => true, // enable/disable the multiple selection functionality
// 'sortable' => false, // enable/disable the reordering with drag&drop
// 'mime_types' => null, // visible mime prefixes; ex. ['image'] or ['application/pdf']
]);
```

The field assumes you've cast your attribute as ```array``` on your model. That way, when you do ```$entry->files``` you get a nice array.
**NOTE:** If you use `multiple => false` you should NOT cast your attribute as ```array```

Input preview:

![CRUD Field - browse_multiple](https://backpackforlaravel.com/uploads/docs-4-2/fields/browse_multiple.png)

<hr>

<a name="base64-image"></a>
### base64_image <span class="badge badge-pill badge-info">PRO</span>

Expand Down

0 comments on commit 8ed8018

Please sign in to comment.