OrderStatus.php 516 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Shop\OrderStatuses;
  3. use App\Shop\Orders\Order;
  4. use Illuminate\Database\Eloquent\Model;
  5. class OrderStatus extends Model
  6. {
  7. /**
  8. * The attributes that are mass assignable.
  9. *
  10. * @var array
  11. */
  12. protected $fillable = [
  13. 'name',
  14. 'color',
  15. ];
  16. /**
  17. * The attributes that should be hidden for arrays.
  18. *
  19. * @var array
  20. */
  21. protected $hidden = [];
  22. public function orders()
  23. {
  24. return $this->hasMany(Order::class);
  25. }
  26. }