fix logic and tests, update docker CI file
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\BaseModel;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ClassSection extends BaseModel
|
||||
{
|
||||
use HasFactory;
|
||||
// CI table name is "classSection"
|
||||
protected $table = 'classSection';
|
||||
|
||||
@@ -28,6 +30,16 @@ class ClassSection extends BaseModel
|
||||
'class_section_id' => 'integer',
|
||||
];
|
||||
|
||||
public function getSectionNameAttribute(): ?string
|
||||
{
|
||||
return $this->attributes['class_section_name'] ?? null;
|
||||
}
|
||||
|
||||
public function setSectionNameAttribute($value): void
|
||||
{
|
||||
$this->attributes['class_section_name'] = $value;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
* Relationships (optional)
|
||||
* ========================= */
|
||||
@@ -136,4 +148,4 @@ class ClassSection extends BaseModel
|
||||
->get()
|
||||
->toArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user