REBELinBLUE\Deployer\Contracts\Repositories\DeploymentRepositoryInterface::create PHP Метод

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

public create ( array $fields ) : Model
$fields array
Результат Illuminate\Database\Eloquent\Model
    public function create(array $fields);

Usage Example

Пример #1
0
 /**
  * Handles incoming requests to trigger deploy.
  *
  * @param Request $request
  * @param string $hash The webhook hash
  *
  * @return \Illuminate\View\View
  */
 public function webhook(Request $request, $hash)
 {
     $project = $this->projectRepository->getByHash($hash);
     $success = false;
     if ($project->servers->where('deploy_code', true)->count() > 0) {
         $payload = $this->parseWebhookRequest($request, $project);
         if (is_array($payload)) {
             $this->deploymentRepository->abortQueued($project->id);
             $this->deploymentRepository->create($payload);
             $success = true;
         }
     }
     return ['success' => $success];
 }
All Usage Examples Of REBELinBLUE\Deployer\Contracts\Repositories\DeploymentRepositoryInterface::create