Bosnadev\Repositories\Console\Commands\Creators\CriteriaCreator::getDirectory PHP Method

getDirectory() public method

Get the criteria directory.
public getDirectory ( ) : string
return string
    public function getDirectory()
    {
        // Model
        $model = $this->getModel();
        // Get the criteria path from the config file.
        $directory = Config::get('repositories.criteria_path');
        // Check if the model is not null.
        if (isset($model) && !empty($model)) {
            // Update the directory with the model name.
            $directory .= DIRECTORY_SEPARATOR . $this->pluralizeModel();
        }
        // Return the directory.
        return $directory;
    }