Skip to content

Commit

Permalink
adding listtable and formbuilder fuction to all model so that data ca…
Browse files Browse the repository at this point in the history
…n be rendered via json
  • Loading branch information
dedanirungu committed Jul 26, 2023
1 parent c8afbaa commit cf5e16d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Entities/Fleet.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,46 @@
use Modules\Base\Entities\BaseModel;
use Illuminate\Database\Schema\Blueprint;

use Modules\Core\Classes\Views\ListTable;
use Modules\Core\Classes\Views\FormBuilder;

class Fleet extends BaseModel
{

protected $fillable = ['name'];
public $migrationDependancy = [];
protected $table = "fleet";


public function listTable(){
// listing view fields
$fields = new ListTable();

$fields->name('name')->type('text')->ordering(true);

return $fields;

}

public function formBuilder(){
// listing view fields
$fields = new FormBuilder();

$fields->name('name')->type('text')->group('w-1/2');

return $fields;

}

public function filter(){
// listing view fields
$fields = new FormBuilder();

$fields->name('name')->type('text')->group('w-1/6');

return $fields;

}
/**
* List of fields for managing postings.
*
Expand Down

0 comments on commit cf5e16d

Please sign in to comment.