Редактор карты зала
Электронные заказы
Отчет по удалениям
This commit is contained in:
miroman-afk
2022-09-22 16:34:02 +03:00
parent 1af2b267f5
commit dcd0e72d1f
43 changed files with 2481 additions and 727 deletions

19
models/StaffRights.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
namespace App\Component\Models;
use Illuminate\Database\Eloquent\Model;
class StaffRights extends Model {
protected $table = 'staff_rights';
public static function add($code, $name) {
if (StaffRights::where('code', $code)->count() == 0) {
$staffRight = new StaffRights([
'code' => $code,
'name' => $name,
]);
$staffRight->save();
}
}
}