Commit 6b3a11e4b285bc42c51b0370f001b8d65e1439d7

Authored by Андрей Ларионов
1 parent 066f7f9f85
Exists in master

Баг с регистром

Showing 1 changed file with 1 additions and 1 deletions Inline Diff

app/Models/infobloks.php
1 <?php 1 <?php
2 2
3 namespace App\Models; 3 namespace App\Models;
4 4
5 use Illuminate\Database\Eloquent\Factories\HasFactory; 5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Database\Eloquent\Model; 6 use Illuminate\Database\Eloquent\Model;
7 7
8 class infobloks extends Model 8 class infobloks extends Model
9 { 9 {
10 use HasFactory; 10 use HasFactory;
11 11
12 protected $fillable = [ 12 protected $fillable = [
13 'name', 13 'name',
14 'is_remove', 14 'is_remove',
15 'sort', 15 'sort',
16 ]; 16 ];
17 17
18 public function ScopeActive($query) { 18 public function ScopeActive($query) {
19 return $query->where('is_remove', '=', '0'); 19 return $query->where('is_remove', '=', '0');
20 } 20 }
21 21
22 /* 22 /*
23 * Связь модели Инфоблоки (Infobloks) с моделью Доп.информация (dop_info) 23 * Связь модели Инфоблоки (Infobloks) с моделью Доп.информация (dop_info)
24 один-ко-многим 24 один-ко-многим
25 */ 25 */
26 public function model_dop_info() { 26 public function model_dop_info() {
27 return $this->hasMany(dop_info::class, 'infoblok_id'); 27 return $this->hasMany(Dop_info::class, 'infoblok_id');
28 } 28 }
29 } 29 }
30 30