Skip to content

Commit e1bfbd5

Browse files
authored
Update README.md
1 parent 652ba92 commit e1bfbd5

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
laravel-admin grid-sortable
22
======
33

4+
This extension can help you sort by dragging the rows of the data list, the front end is based on [jQueryUI sortable](https://jqueryui.com/sortable/), and the back end is based on [eloquent-sortable](https://github.com/spatie/eloquent-sortable)
5+
46
这个插件可以帮助你通过拖动数据列表的行来进行排序,前端基于[jQueryUI sortable](https://jqueryui.com/sortable/), 后端基于[eloquent-sortable](https://github.com/spatie/eloquent-sortable)
57

68
![Kapture 2019-06-25 at 10 14 51](https://user-images.githubusercontent.com/1479100/60064224-50b97080-9732-11e9-8023-431fc6fe81a5.gif)
@@ -11,16 +13,15 @@ laravel-admin grid-sortable
1113
composer require laravel-admin-ext/grid-sortable -vvv
1214
```
1315

14-
发布静态资源
16+
Publish asserts
1517

1618
```shell
1719
php artisan vendor:publish --provider="Encore\Admin\GridSortable\GridSortableServiceProvider"
1820
```
1921

20-
2122
## Usage
2223

23-
定义模型
24+
Define your model
2425

2526
```php
2627
<?php
@@ -40,28 +41,26 @@ class MyModel extends Model implements Sortable
4041
}
4142
```
4243

43-
在Grid中使用
44+
Use in grid
4445

4546
```php
4647
$grid = new Grid(new MyModel);
4748

4849
$grid->sortable();
4950
```
5051

51-
这样会给表格增加一列排序列,拖动之后在表格顶部会出现一个Save order的按钮,点击保存排序
52+
This will add a column to the grid. After dragging one row, a `Save order` button will appear at the top of the grid. Click to save order.
5253

5354
## Translation
5455

55-
排序保存按钮默认的文字是`Save order`,如果使用其他语言,比如简体中文,那么可以在`resources/lang/zh-CN.json`文件中增加一项翻译
56+
The default text for the button is `Save order`. If you use an other language, such as Simplified Chinese, you can add a translation to the `resources/lang/zh-CN.json` file.
5657

5758
```json
5859
{
5960
"Save order": "保存排序"
6061
}
6162
```
6263

63-
其他语言也是按照上面的方式操作。
64-
6564
## Donate
6665

6766
> Help keeping the project development going, by donating a little. Thanks in advance.

0 commit comments

Comments
 (0)