/** * Gets the pipe object from the model * * @param Model $pipeable Model to get pipe from * * @return \App\Pipeline\Pipe|null */ public function getPipeFromPipeable(Model $pipeable) { $pipe = PipeFactory::make($pipeable); if ($pipe === null) { return; } return $pipe; }
/** * Starts the pipeline with a model * * @param Model $model Model that will be used to get the correct pipe * @return void */ public function startWithModel(Model $model) { $initialPipe = PipeFactory::make($model); $this->startWith($initialPipe); }