clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

Allow adding our own middleware

Open syamsoul opened this issue 6 months ago • 1 comments

I think it would be good if we have an option to add our own middleware to clockwork routes.

Image

For example, maybe in config/clockwork.php:

<?php

return [
    // .......other configs

    'web' => env('CLOCKWORK_WEB', true),
    'web_middleware' => [], // default to empty array

    // .......other configs

below, we can add middleware:

<?php

return [
    // .......other configs

    'web' => env('CLOCKWORK_WEB', true),
    'web_middleware' => ['auth:admin', 'is_verified'],

    // .......other configs

I hope you consider this request and thank you for this amazing package👍.

syamsoul avatar Jun 21 '25 06:06 syamsoul

Hey, this is an interesting idea, thanks.

itsgoingd avatar Sep 14 '25 14:09 itsgoingd