DistAppearanceVariable.php 663 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Admin\Repositories;
  3. use App\Models\DistAppearanceVariable as Model;
  4. use Dcat\Admin\Repositories\EloquentRepository;
  5. class DistAppearanceVariable extends EloquentRepository
  6. {
  7. /**
  8. * Model.
  9. *
  10. * @var string
  11. */
  12. protected $eloquentClass = Model::class;
  13. public static function getVariableRow($distId,$appearanceId,$templateId)
  14. {
  15. $model = new Model();
  16. $variable = $model->where('dist_id',$distId)->where('appearance_id',$appearanceId)->whereIn('template_ids',[0,$templateId])->get();
  17. if($variable){
  18. return $variable;
  19. }else{
  20. return '';
  21. }
  22. }
  23. }