Change NextKey to create record in Module table if it doesnt exist

This commit is contained in:
Deon George
2021-06-30 14:18:12 +10:00
parent ec738d590c
commit d02df6e98a
3 changed files with 23 additions and 3 deletions

View File

@@ -4,9 +4,16 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Traits\NextKey;
class Module extends Model
{
use NextKey;
const RECORD_ID = 'module';
protected $table = 'ab_module';
public $incrementing = FALSE;
public $timestamps = FALSE;
public function record()