Bosnadev\Repositories\Console\Commands\Creators\RepositoryCreator::create PHP Метод

create() публичный Метод

Create the repository.
public create ( $repository, $model ) : integer
$repository
$model
Результат integer
    public function create($repository, $model)
    {
        // Set the repository.
        $this->setRepository($repository);
        // Set the model.
        $this->setModel($model);
        // Create the directory.
        $this->createDirectory();
        // Return result.
        return $this->createClass();
    }

Usage Example

Пример #1
0
 /**
  * @param $arguments
  * @param $options
  */
 protected function writeRepository($arguments, $options)
 {
     // Set repository.
     $repository = $arguments['repository'];
     // Set model.
     $model = $options['model'];
     // Create the repository.
     if ($this->creator->create($repository, $model)) {
         // Information message.
         $this->info("Successfully created the repository class");
     }
 }