lorisleiva / laravel-actions

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

Usage with Laravel Pipeline ? #271

Closed eznix86 closed 1 month ago

eznix86 commented 8 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 8 months ago

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

nickfls commented 8 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 7 months ago

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

Wulfheart commented 1 month ago

Closing due to inactivity. If you feel your issue is still relevant please open a new one with a link to a repository containing a minimal reproducible example.