App\Services\Repositories\OptionRepository::__construct PHP 메소드

__construct() 공개 메소드

Create a new option repository.
public __construct ( ) : void
리턴 void
    public function __construct()
    {
        try {
            $options = DB::table('options')->get();
        } catch (QueryException $e) {
            $options = [];
        }
        foreach ($options as $option) {
            $this->items[$option->option_name] = $option->option_value;
        }
    }