1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
Admin::model('\App\Training_Resource')->title('Recursos de formació')->with()->filters(function () |
4
|
|
|
{ |
5
|
|
|
|
6
|
|
|
})->columns(function () |
7
|
|
|
{ |
8
|
|
|
//Column::image('training_resource_thumbnail'); |
|
|
|
|
9
|
|
|
Column::string('training_resource_id', 'ID'); |
10
|
|
|
Column::string('training_resource_name', 'Nom'); |
11
|
|
|
//Column::string('training_resource_short_name', 'Nom Curt'); |
|
|
|
|
12
|
|
|
Column::string('training_resource_description', 'Descripció'); |
13
|
|
|
//Column::string('training_resource_external_url', 'URL'); |
|
|
|
|
14
|
|
|
//Column::string('training_resource_name', 'Pare')->append(Column::where('training_resource_id', '=', 'training_resource_parentResourceId')); |
|
|
|
|
15
|
|
|
Column::string('parent.training_resource_name', 'Pare'); |
16
|
|
|
|
17
|
|
|
})->form(function () |
18
|
|
|
{ |
19
|
|
|
FormItem::text('training_resource_name', 'Nom')->required(); |
20
|
|
|
FormItem::text('training_resource_short_name', 'Nom Curt'); |
21
|
|
|
FormItem::image('training_resource_thumbnail', 'Imatge'); |
22
|
|
|
FormItem::text('training_resource_external_url', 'URL Externa'); |
23
|
|
|
FormItem::select('training_resource_parentResourceId', 'Pare')->list('\App\Training_Resource')->nullable(); |
24
|
|
|
//FormItem::timestamp('training_resource_entryDate', 'Data Creació');//->seconds(true); |
|
|
|
|
25
|
|
|
//FormItem::timestamp('training_resource_last_update', 'Data de l\'última modificació');//->seconds(true); |
26
|
|
|
FormItem::checkbox('training_resource_softDeleted', 'SoftDeleted'); |
27
|
|
|
FormItem::ckeditor('training_resource_description', 'Descripció'); |
28
|
|
|
|
29
|
|
|
|
30
|
|
|
|
31
|
|
|
//FormItem::text('training_resource_creationUserId', 'Training Resource Creation User Id'); |
|
|
|
|
32
|
|
|
//FormItem::text('training_resource_lastupdateUserId', 'Training Resource Lastupdate User Id'); |
|
|
|
|
33
|
|
|
|
34
|
|
|
//FormItem::timestamp('training_resource_softDeletedDate', 'Training Resource Soft Deleted Date');//->seconds(true); |
|
|
|
|
35
|
|
|
}); |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.