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

add a search function to webed triangle theme #33

Closed
butternutweb opened this issue Jun 17, 2017 · 1 comment
Closed

add a search function to webed triangle theme #33

butternutweb opened this issue Jun 17, 2017 · 1 comment

Comments

@butternutweb
Copy link

Please tell me how to incorporate search function to the default theme

@duysolo
Copy link
Owner

duysolo commented Jun 17, 2017

Hello,
You need to specify a search route in webed-pages config.
Here is the example:

'public_routes' => [
        'web' => [
            'get' => [
                [
                    '/search',
                    [
                        'as' => 'front.search.get',
                        'uses' => 'WebEd\Themes\NewsTV\Http\Controllers\Search\SearchController@index',
                    ]
                ],
                [
                    '/{slug?}',
                    [
                        'as' => 'front.web.resolve-pages.get',
                        'uses' => 'WebEd\Base\Pages\Http\Controllers\Front\ResolvePagesController@handle',
                        'where' => [
                            'slug' => '[-A-Za-z0-9]+'
                        ]
                    ]
                ]
            ],
        ],
        'api' => [

        ],
    ],

@duysolo duysolo closed this as completed Jun 20, 2017
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

No branches or pull requests

2 participants