Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions 3.4/crud-operation-delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

--

<a href="about"></a>
<a name="about"></a>
## About

This CRUD operation allows your admins to remove one or more entries from the table.

>In case your entity has SoftDeletes, it will perform a soft delete. The admin will _not_ know that his entry has been hard or soft deleted, since it will no longer show up in the ListEntries view.

<a href="delete-a-single-item"></a>
<a name="delete-a-single-item"></a>
## Delete a Single Item

<a href="how-it-works"></a>
<a name="how-it-works"></a>
### How it Works

Using AJAX, a DELETE request is performed towards ```/entity-name/{id}```, which points to the ```destroy()``` method in your EntityCrudController.

<a href="enabling"></a>
<a name="enabling"></a>
### How to Use

The ```Delete``` action is **enabled by default**. To disable it, you should use ```$this->crud->denyAccess('delete');``` inside your ```setup()``` method. This will prevent the Delete button from appearing in the table view, and will deny access to the controller method if manually accessed.

<a href="how-to-overwrite"></a>
<a name="how-to-overwrite"></a>
### How to Overwrite

In case you need to change how this operation works, just create a ```destroy()``` method in your EntityCrudController:
Expand All @@ -42,18 +42,18 @@ You can also overwrite the delete button by creating a file with the same name i
php artisan backpack:crud:publish buttons/delete
```

<a href="delete-multiple-items-bulk-delete"></a>
<a name="delete-multiple-items-bulk-delete"></a>
## Delete Multiple Items (Bulk Delete)

In addition to the button for each entry, you can show checkboxes next to each element, and allow your admin to delete multiple entries at once.


<a href="how-it-works"></a>
<a name="how-it-works"></a>
### How it Works

Using AJAX, a DELETE request is performed towards ```/entity-name/bulk-delete```, which points to the ```bulkDelete()``` method in your EntityCrudController.

<a href="enabling"></a>
<a name="enabling"></a>
### How to Use

The ```bulkDelete()``` action is **enabled by default**, but there are no buttons using it. To make the buttons show up, inside your ```setup()``` method you should:
Expand All @@ -63,7 +63,7 @@ $this->crud->enableBulkActions();
$this->crud->addBulkDeleteButton();
```

<a href="how-to-overwrite"></a>
<a name="how-to-overwrite"></a>
### How to Overwrite

In case you need to change how this operation works, just create a ```bulkDelete()``` method in your EntityCrudController:
Expand Down
8 changes: 4 additions & 4 deletions 3.4/crud-operation-show.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

--

<a href="about"></a>
<a name="about"></a>
## About

This CRUD operation allows your admins to preview an entry. When enabled, it will add a "Preview" button in the ListEntries view, that points to a show page:
Expand All @@ -11,19 +11,19 @@ This CRUD operation allows your admins to preview an entry. When enabled, it wil

In case your entity is translatable, it will show a multi-language dropdown, just like Edit.

<a href="how-it-works"></a>
<a name="how-it-works"></a>
## How it Works

The ```/entity-name/{id}``` route points to the ```show()``` method in your EntityCrudController. Inside this method, it uses ```setFromDb()``` to try to magically figure out all attributes you would like shown for this Model, and shows them using [Column types](/docs/{{version}}/crud-columns) inside ```show.blade.php```.

<a href="enabling"></a>
<a name="enabling"></a>
## How to Use

The ```ListEntries``` operations is **disabled by default**. To enable it, you should use ```$this->crud->allowAccess('show');``` inside your ```setup()``` method.This will make a Preview button appear in the table view, and allow access to the show view.

This view uses the same column types you've defined in ```setup()``` and adds all other fillable attributes. You will most likely need to add/change/remove columns, so also check out [How to Overwrite](#how-to-overwrite).

<a href="how-to-overwrite"></a>
<a name="how-to-overwrite"></a>
## How to Overwrite

In case you need to add/change/remove any columns, create a ```show()``` method in your EntityCrudController. Using the ```addColumn()``` you're already familiar with, you can change how those attributes are shown to the admin. For example:
Expand Down
4 changes: 2 additions & 2 deletions 4.0/base-breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Notice the last item should NOT have a link, it should be ```false```.
<a name="how-to-define-breadcrumbs"></a>
## How to Define Breadcrumbs

<a href="define-breadcrumbs-in-the-controller"></a>
<a name="define-breadcrumbs-in-the-controller"></a>
### Define Breadcrumbs Inside the Controller

Make sure a ```$breadcrumbs``` variable is present inside your views:
Expand All @@ -68,7 +68,7 @@ Make sure a ```$breadcrumbs``` variable is present inside your views:
}
```

<a href="define-breadcrumbs-in-the-view"></a>
<a name="define-breadcrumbs-in-the-view"></a>
### Define Breadcrumbs Inside the View

Make sure a ```$breadcrumbs``` variable is present:
Expand Down
16 changes: 8 additions & 8 deletions 4.0/base-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Our default design might not be pleasant for your, or you might need to make the

You'll find a few examples below - but you should use which classes you want to get the result you need.

<a href="ui-with-dark-sidebar"></a>
<a name="ui-with-dark-sidebar"></a>
#### Backstrap

Transparent top menu, transparent sidebar, transparent footer. This is the default. This is what _we_ think is best for most users, from our 8+ years of experience building admin panels. Prioritising _content_ over _menus_.
Expand All @@ -93,7 +93,7 @@ Transparent top menu, transparent sidebar, transparent footer. This is the defau
'footer_class' => 'app-footer',
```

<a href="inspired-by-coreui"></a>
<a name="inspired-by-coreui"></a>
#### Inspired by CoreUI

White top menu, dark sidebar.
Expand All @@ -107,7 +107,7 @@ White top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="inspired-by-github"></a>
<a name="inspired-by-github"></a>
#### Inspired by Github

Black top menu, white sidebar.
Expand All @@ -121,7 +121,7 @@ Black top menu, white sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="blue-top-menu"></a>
<a name="blue-top-menu"></a>
#### Blue Top Menu

Blue top menu, dark sidebar.
Expand All @@ -136,7 +136,7 @@ Blue top menu, dark sidebar.
```


<a href="inspired-by-contruction"></a>
<a name="inspired-by-contruction"></a>
#### Construction / Warning

Yellow top menu, dark sidebar.
Expand All @@ -150,7 +150,7 @@ Yellow top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="red-top-menu"></a>
<a name="red-top-menu"></a>
#### Red Top Menu

Red top menu, dark sidebar.
Expand All @@ -164,7 +164,7 @@ Red top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="pink-top-menu"></a>
<a name="pink-top-menu"></a>
#### Pink Top Menu

Pink top menu, transparent sidebar.
Expand All @@ -179,7 +179,7 @@ Pink top menu, transparent sidebar.
```


<a href="green-top-menu"></a>
<a name="green-top-menu"></a>
#### Green Top Menu

Green top menu, white sidebar.
Expand Down
2 changes: 1 addition & 1 deletion 4.0/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ instead of
This is completely optional - whatever you prefer.


<a href="views"></a>
<a name="views"></a>
### Views

Most views have suffered big changes, since we've moved from Bootstrap 3 to Bootstrap 4, and from AdminLTE to CoreUI. If you've overwritten many Backpack views, the upgrade process will be more difficult for you: you have to start from our new views and make the changes again.
Expand Down
4 changes: 2 additions & 2 deletions 4.1/base-breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Notice the last item should NOT have a link, it should be ```false```.
<a name="how-to-define-breadcrumbs"></a>
## How to Define Breadcrumbs

<a href="define-breadcrumbs-in-the-controller"></a>
<a name="define-breadcrumbs-in-the-controller"></a>
### Define Breadcrumbs Inside the Controller

Make sure a ```$breadcrumbs``` variable is present inside your views:
Expand All @@ -68,7 +68,7 @@ Make sure a ```$breadcrumbs``` variable is present inside your views:
}
```

<a href="define-breadcrumbs-in-the-view"></a>
<a name="define-breadcrumbs-in-the-view"></a>
### Define Breadcrumbs Inside the View

Make sure a ```$breadcrumbs``` variable is present:
Expand Down
16 changes: 8 additions & 8 deletions 4.1/base-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Our default design might not be pleasant for your, or you might need to make the

You'll find a few examples below - but you should use which classes you want to get the result you need.

<a href="ui-with-dark-sidebar"></a>
<a name="ui-with-dark-sidebar"></a>
#### Backstrap

Transparent top menu, transparent sidebar, transparent footer. This is the default. This is what _we_ think is best for most users, from our 8+ years of experience building admin panels. Prioritising _content_ over _menus_.
Expand All @@ -93,7 +93,7 @@ Transparent top menu, transparent sidebar, transparent footer. This is the defau
'footer_class' => 'app-footer',
```

<a href="inspired-by-coreui"></a>
<a name="inspired-by-coreui"></a>
#### Inspired by CoreUI

White top menu, dark sidebar.
Expand All @@ -107,7 +107,7 @@ White top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="inspired-by-github"></a>
<a name="inspired-by-github"></a>
#### Inspired by Github

Black top menu, white sidebar.
Expand All @@ -121,7 +121,7 @@ Black top menu, white sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="blue-top-menu"></a>
<a name="blue-top-menu"></a>
#### Blue Top Menu

Blue top menu, dark sidebar.
Expand All @@ -136,7 +136,7 @@ Blue top menu, dark sidebar.
```


<a href="inspired-by-contruction"></a>
<a name="inspired-by-contruction"></a>
#### Construction / Warning

Yellow top menu, dark sidebar.
Expand All @@ -150,7 +150,7 @@ Yellow top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="red-top-menu"></a>
<a name="red-top-menu"></a>
#### Red Top Menu

Red top menu, dark sidebar.
Expand All @@ -164,7 +164,7 @@ Red top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="pink-top-menu"></a>
<a name="pink-top-menu"></a>
#### Pink Top Menu

Pink top menu, transparent sidebar.
Expand All @@ -179,7 +179,7 @@ Pink top menu, transparent sidebar.
```


<a href="green-top-menu"></a>
<a name="green-top-menu"></a>
#### Green Top Menu

Green top menu, white sidebar.
Expand Down
2 changes: 1 addition & 1 deletion 4.1/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Why? Since ```$this->request``` did nothing at all, we've removed it, to avoid a

Additionally, for the `select2_from_ajax` and `select2_from_ajax_multiple` field types, the inputs on the main form are no longer sent through the AJAX request by default. If you're using [dependant selects](https://backpackforlaravel.com/docs/4.1/crud-how-to#add-a-select2-field-that-depends-on-another-field), please make sure that you add `'include_all_form_fields' => true` to your `select2_from_ajax` and `select2_from_ajax_multiple` field definition to keep the same behaviour as before.

<a href="assets"></a>
<a name="assets"></a>
### CSS & JS Assets

<a name="step-13" href="#step-13" class="badge badge-info text-white" style="text-decoration: none;">Step 13.</a> We've updated most CSS & JS dependencies to their latest versions. There are two ways to publish the latest styles and scripts for these dependencies:
Expand Down
4 changes: 2 additions & 2 deletions 5.x/base-breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Notice the last item should NOT have a link, it should be ```false```.
<a name="how-to-define-breadcrumbs"></a>
## How to Define Breadcrumbs

<a href="define-breadcrumbs-in-the-controller"></a>
<a name="define-breadcrumbs-in-the-controller"></a>
### Define Breadcrumbs Inside the Controller

Make sure a ```$breadcrumbs``` variable is present inside your views:
Expand All @@ -68,7 +68,7 @@ Make sure a ```$breadcrumbs``` variable is present inside your views:
}
```

<a href="define-breadcrumbs-in-the-view"></a>
<a name="define-breadcrumbs-in-the-view"></a>
### Define Breadcrumbs Inside the View

Make sure a ```$breadcrumbs``` variable is present:
Expand Down
16 changes: 8 additions & 8 deletions 5.x/base-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Our default design might not be pleasant for your, or you might need to make the

You'll find a few examples below - but you should use which classes you want to get the result you need.

<a href="ui-with-dark-sidebar"></a>
<a name="ui-with-dark-sidebar"></a>
#### Backstrap

Transparent top menu, transparent sidebar, transparent footer. This is the default. This is what _we_ think is best for most users, from our 8+ years of experience building admin panels. Prioritising _content_ over _menus_.
Expand All @@ -93,7 +93,7 @@ Transparent top menu, transparent sidebar, transparent footer. This is the defau
'footer_class' => 'app-footer',
```

<a href="inspired-by-coreui"></a>
<a name="inspired-by-coreui"></a>
#### Inspired by CoreUI

White top menu, dark sidebar.
Expand All @@ -107,7 +107,7 @@ White top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="inspired-by-github"></a>
<a name="inspired-by-github"></a>
#### Inspired by GitHub

Black top menu, white sidebar.
Expand All @@ -121,7 +121,7 @@ Black top menu, white sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="blue-top-menu"></a>
<a name="blue-top-menu"></a>
#### Blue Top Menu

Blue top menu, dark sidebar.
Expand All @@ -136,7 +136,7 @@ Blue top menu, dark sidebar.
```


<a href="inspired-by-contruction"></a>
<a name="inspired-by-contruction"></a>
#### Construction / Warning

Yellow top menu, dark sidebar.
Expand All @@ -150,7 +150,7 @@ Yellow top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="red-top-menu"></a>
<a name="red-top-menu"></a>
#### Red Top Menu

Red top menu, dark sidebar.
Expand All @@ -164,7 +164,7 @@ Red top menu, dark sidebar.
'footer_class' => 'app-footer d-none',
```

<a href="pink-top-menu"></a>
<a name="pink-top-menu"></a>
#### Pink Top Menu

Pink top menu, transparent sidebar.
Expand All @@ -179,7 +179,7 @@ Pink top menu, transparent sidebar.
```


<a href="green-top-menu"></a>
<a name="green-top-menu"></a>
#### Green Top Menu

Green top menu, white sidebar.
Expand Down
2 changes: 1 addition & 1 deletion 5.x/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Alternatively... if you absolutely _hate_ this new behaviour and want your previ
- you can create a new file in your `resources/views/vendor/backpack/fields/page_or_link.blade.php` and paste [the content from here](https://raw.githubusercontent.com/Laravel-Backpack/MenuCRUD/e0afc7960d5513017ef847480f50591400bd4a6b/src/resources/views/fields/page_or_link.blade.php);


<a href="assets"></a>
<a name="assets"></a>
### CSS & JS Assets

<a name="step-18" href="#step-18" class="badge badge-danger text-white" style="text-decoration: none;">Step 18.</a> We've removed the custom CSS & JS files that Backpack provided for each operation (eg. `list.css` and `create.js` - [see why here](https://github.com/Laravel-Backpack/CRUD/pull/3942)).
Expand Down
Loading
Loading