Skip to content

Allow adding our own middlewareĀ #742

@syamsoul

Description

@syamsoul

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šŸ‘.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions