lorisleiva / laravel-actions

⚡️ Laravel components that take care of one specific task
https://laravelactions.com
MIT License
2.41k stars 117 forks source link

Usage with Laravel Pipeline ? #271

Open eznix86 opened 5 months ago

eznix86 commented 5 months ago

How to use it with Laravel Pipeline ?

Should we use it with method overload ?

because Pipeline actions is handle($mixed, $closure), but we also has handle function in laravel actions.

n3storm commented 4 months ago

I wondered this too and will allow me to reuse a lot of stuff

nickfls commented 4 months ago

@eznix86 @n3storm as far as i know, you can change the Pipeline method to anything you want: from \Illuminate\Pipeline\Pipeline::via()

    /**
     * Set the method to call on the pipes.
     *
     * @param  string  $method
     * @return $this
     */
    public function via($method)
    {
        $this->method = $method;

        return $this;
    }
n3storm commented 3 months ago

I think via method is sufficient, sorry I overlooked it.