Skip to content

Commit ccbfc2e

Browse files
committed
Merge branch 'main' into pr/188
2 parents 36b062a + e2b4294 commit ccbfc2e

File tree

6 files changed

+10
-35
lines changed

6 files changed

+10
-35
lines changed

src/Console/stubs/crud-controller.stub

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ class DummyClassCrudController extends CrudController
3939
*/
4040
protected function setupListOperation()
4141
{
42-
CRUD::setFromDb(); // columns
42+
CRUD::setFromDb(); // set columns from db columns.
4343

4444
/**
45-
* Columns can be defined using the fluent syntax or array syntax:
45+
* Columns can be defined using the fluent syntax:
4646
* - CRUD::column('price')->type('number');
47-
* - CRUD::addColumn(['name' => 'price', 'type' => 'number']);
4847
*/
4948
}
5049

@@ -57,13 +56,11 @@ class DummyClassCrudController extends CrudController
5756
protected function setupCreateOperation()
5857
{
5958
CRUD::setValidation(DummyClassRequest::class);
60-
61-
CRUD::setFromDb(); // fields
59+
CRUD::setFromDb(); // set fields from db columns.
6260

6361
/**
64-
* Fields can be defined using the fluent syntax or array syntax:
62+
* Fields can be defined using the fluent syntax:
6563
* - CRUD::field('price')->type('number');
66-
* - CRUD::addField(['name' => 'price', 'type' => 'number']));
6764
*/
6865
}
6966

src/Console/stubs/crud-model.stub

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class DummyClass extends Model
2323
protected $guarded = ['id'];
2424
// protected $fillable = [];
2525
// protected $hidden = [];
26-
// protected $dates = [];
2726

2827
/*
2928
|--------------------------------------------------------------------------

src/Console/stubs/field.stub

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@
2222
{{-- CUSTOM CSS --}}
2323
@push('crud_fields_styles')
2424
{{-- How to load a CSS file? --}}
25-
@loadOnce('dummyFieldStyle.css')
25+
@basset('dummyFieldStyle.css')
2626

2727
{{-- How to add some CSS? --}}
28-
@loadOnce('dummy_field_style')
28+
@bassetBlock('backpack/crud/fields/dummy_field-style.css')
2929
<style>
3030
.dummy_field_class {
3131
display: none;
3232
}
3333
</style>
34-
@endLoadOnce
34+
@endBassetBlock
3535
@endpush
3636

3737
{{-- CUSTOM JS --}}
3838
@push('crud_fields_scripts')
3939
{{-- How to load a JS file? --}}
40-
@loadOnce('dummyFieldScript.js')
40+
@basset('dummyFieldScript.js')
4141

4242
{{-- How to add some JS to the field? --}}
43-
@loadOnce('bpFieldInitDummyFieldElement')
43+
@bassetBlock('path/to/script.js')
4444
<script>
4545
function bpFieldInitDummyFieldElement(element) {
4646
// this function will be called on pageload, because it's
@@ -50,5 +50,5 @@
5050
console.log(element.val());
5151
}
5252
</script>
53-
@endLoadOnce
53+
@endBassetBlock
5454
@endpush

src/Console/stubs/filter.stub

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212
{{-- ########################################### --}}
1313
{{-- Extra CSS and JS for this particular filter --}}
1414

15-
{{-- FILTERS EXTRA CSS --}}
16-
{{-- push things in the after_styles section --}}
17-
18-
{{-- @push('crud_list_styles')
19-
no css
20-
@endpush --}}
21-
22-
2315
{{-- FILTERS EXTRA JS --}}
2416
{{-- push things in the after_scripts section --}}
2517

src/Console/stubs/model-softdelete.stub

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ class DummyClass extends Model
5757
*/
5858
// protected $hidden = [];
5959

60-
/**
61-
* The attributes that should be mutated to dates.
62-
*
63-
* @var array
64-
*/
65-
// protected $dates = [];
6660

6761
/*
6862
|--------------------------------------------------------------------------

src/Console/stubs/model.stub

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ class DummyClass extends Model
5454
*/
5555
// protected $hidden = [];
5656

57-
/**
58-
* The attributes that should be mutated to dates.
59-
*
60-
* @var array
61-
*/
62-
// protected $dates = [];
63-
6457
/*
6558
|--------------------------------------------------------------------------
6659
| FUNCTIONS

0 commit comments

Comments
 (0)