Blame view

app/Models/Good.php 659 Bytes
b80175387   Андрей Ларионов   Начальный проект ...
1
2
3
4
5
6
7
8
9
10
  <?php
  
  namespace App\Models;
  
  use Illuminate\Database\Eloquent\Factories\HasFactory;
  use Illuminate\Database\Eloquent\Model;
  
  class Good extends Model
  {
      use HasFactory;
1bd0c6ebe   Андрей Ларионов   Админка, товары. ...
11
12
13
14
15
16
17
18
19
20
21
  
      protected  $fillable = ['title', 'image', 'category_id', 'price',
                              'price_old', 'manufacturer', 'country', 'size',
                              'power', 'description', 'feature', 'equipment',
                              'accessory_id', 'tooling_id', 'weight', 'new',
                              'stock_count', 'demo', 'way', 'type_good'
          ];
  
      public function category() {
          return $this->belongsTo(Category::class, 'category_id');
      }
b80175387   Андрей Ларионов   Начальный проект ...
22
  }