Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Add support to display statamic widgets on resource index page #387

Closed
wants to merge 3 commits into from

Conversation

saqueib
Copy link

@saqueib saqueib commented Dec 16, 2023

This PR adds support for statamic widgets to be displayed on top of resource index page similar to Nova. To add a widget you just need to add widgets on resource configuration.

'resources' => [
	\App\Models\Order::class => [
	    'name' => 'Orders',
	    
	    // define all widgets for order resource
		'widgets' => [
                [
                    'type' => 'earning',
                    'width' => 50
                ],
                [
                    'type' => 'collection',
                    'collection' => 'pages',
                    'width' => 50
                ],
            ],
        ],
    ],
],

Screenshot 2023-12-16 at 10 05 15 AM

@duncanmcclean duncanmcclean changed the title Add support to display statamic widgets on resource index page [5.x] Add support to display statamic widgets on resource index page Dec 16, 2023
@duncanmcclean
Copy link
Member

Hey 👋

Thanks for your pull request! However, I don't feel comfortable introducing these changes in Runway since they'd differ from the functionality offered in Statamic Core. For this reason, I'm going to close this PR.

You're welcome to PR similar functionality into Statamic Core. Then, once it's merged, feel free to re-open this PR and I can re-consider.

@saqueib
Copy link
Author

saqueib commented Dec 16, 2023

okay @duncanmcclean, I have got it working using view composer for my project. I thought it will be good feature to have in runway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants