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