21 lines
472 B
PHP
21 lines
472 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class TlaSuggestion extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $table = 'tla_suggestion';
|
|
|
|
protected $fillable = ['acronym', 'hint', 'language', 'context', 'submitter'];
|
|
|
|
public static function ApproveTla(TlaSuggestion $record) {
|
|
$tla = new Tla($record->toArray());
|
|
$record->delete();
|
|
$tla->save();
|
|
}
|
|
}
|