src/Actions/Publish.php
/**
     * Perform the action on the given models.
     */
Perform the action on the given models.
Perform the action on the given models .
public function handle(ActionFields $fields, Collection $models): void
    {
        foreach ($models as $model) {
            $model->published_at = $fields->date;
            $model->save();
        }
    }
public function handle ( ActionFields $ fields , Collection $ models ) : void { foreach ( $ models as $ model ) { $ model -> published_at = $ fields -> date ; $ model -> save ( ) ; } }
Perform the action on the given models.
Perform the action on the given models .