Support the ongoing development of Laravel.io →
Configuration Requests
Last updated 1 year ago.
0
Solution
Route::get('about', ['uses' => 'PagesController@display', '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!

Eventy

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.

© 2024 Laravel.io - All rights reserved.