Support the ongoing development of Laravel.io →
Configuration Requests
Last updated 10 months ago.
0
Solution
Route::get('about', ['uses' => '[email protected]', 'page' => 'about']);

public function display(\Illuminate\Http\Request $request)
{
    $page = $request->route()->getAction()['page'];
    ...
}

One way to pass that hardcoded data via the route.

0

@lagbox - yes it does the job indeed. Thanks a million!

0

Sign in to participate in this thread!

LoadForge

Your banner here too?

Lewolf lewolf Joined 21 Mar 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 Laravel.io - All rights reserved.