v.2.22
Редактор карты зала Электронные заказы Отчет по удалениям
This commit is contained in:
22
models/Tables.php
Normal file
22
models/Tables.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Component\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Tables extends Model
|
||||
{
|
||||
protected $table = 'place_tables';
|
||||
|
||||
public static function getName($id)
|
||||
{
|
||||
$table = Tables::where('id', $id)->first();
|
||||
if ($table) {
|
||||
$table_name = $table['name'];
|
||||
} else {
|
||||
|
||||
$table_name = 'Связанный стол не найден';
|
||||
}
|
||||
return $table_name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user