diff --git a/templates/scaffold/views/blade_datagrid_table_body.stub b/templates/scaffold/views/blade_datagrid_table_body.stub new file mode 100644 index 0000000..81c0263 --- /dev/null +++ b/templates/scaffold/views/blade_datagrid_table_body.stub @@ -0,0 +1,23 @@ +setActionColumn([ + 'wrapper' => function ($value, $row) { + $out = Form::open(['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', $row->id], 'method' => 'delete']); + $out .= '
'; + $out .= Form::close(); + + return $out; + } + ]); + + echo $grid->show(); +?> diff --git a/templates/scaffold/views/datagrid_table_set_columns.stub b/templates/scaffold/views/datagrid_table_set_columns.stub new file mode 100644 index 0000000..9e22ccd --- /dev/null +++ b/templates/scaffold/views/datagrid_table_set_columns.stub @@ -0,0 +1,4 @@ +->setColumn('$FIELD_DOT_NOTATION_NAME$', '$FIELD_NAME_TITLE$', [ + 'sortable' => true, + 'has_filters' => $FIELD_IS_FILLABLE$, + ])