Modal.php 742 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Models\Parameter\Pro;
  3. use App\Helpers\ProUtils;
  4. use App\Helpers\Utils;
  5. use App\Helpers\ParameterUtils;
  6. use App\Exceptions\ParameterException;
  7. class Modal extends \App\Models\Parameter\Modal
  8. {
  9. protected $data;
  10. public function __construct($para_name, $themeDir = null)
  11. {
  12. try {
  13. if ($themeDir && $themeDir !== 'empty') {
  14. $this->data = ProUtils::getThemeParamFile($para_name, '.json', $themeDir);
  15. } else {
  16. $this->data = ProUtils::getParamFile($para_name);
  17. }
  18. } catch (ParameterException $e) {
  19. return redirect()->route('dashboard')->with('error', $e->getMessage());
  20. }
  21. $this->converterData();
  22. }
  23. }