How do I create a custom set in the account area?

Sets are used for POST/PUT/DELETE requests.

To create and register a custom account area set you need to use on of the following methods:

These methods expects you to pass a class that extends Aero\AccountArea\AccountAreaSet.

\Aero\AccountArea\AccountArea\AccountArea::registerDelete(\Aerocargo\Acme\CustomDelete::class);

Your account area set class must implement the route() and routeName() methods that all should return a string.

You should also define a protected static steps and middleware array:

For example, here's how aerocargo/wishlists defines its delete:

class WishlistDelete extends \Aero\AccountArea\AccountAreaSet
{
    protected static $steps = [
        Steps\DeleteWishlist::class,
    ];

    protected static $middleware = [
        'account',
    ];

    static function route(): string
    {
        return __('wishlist');
    }

    static function routeName(): string
    {
        return 'account.wishlist';
    }
}

 


Revision #1
Created 2026-09-25 12:53:24 UTC by Ethan Payne
Updated 2026-09-25 12:57:32 UTC by Ethan Payne