PrintTemplate.php 482 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. use Illuminate\Database\Eloquent\Relations\HasMany;
  6. class PrintTemplate extends Model
  7. {
  8. use ModelLogChanging;
  9. protected $fillable = ['name','value'];
  10. protected $casts = [
  11. 'value' => 'array'
  12. ];
  13. public function ownerLogisticPrintTemplate(): HasMany
  14. {
  15. return $this->hasMany(OwnerLogisticPrintTemplate::class,'print_template_id','id');
  16. }
  17. }