Closed chinleung closed 4 years ago
In order to replicate:
Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
We have either use a controller, or use the defaults method:
defaults
Route::multilingual('welcome')->defaults([ 'data' => ['name' => 'Taylor'], ]);
However, it'd be nice to be able to pass the view data directly using the data method:
data
Route::multilingual('welcome')->data([ 'name' => 'Taylor', ]);
Or passing the data along with the view method:
view
Route::multilingual('welcome')->view('hello', [ 'name' => 'Taylor', ]);
This feature is available as of v2.5.0 and v1.8.0.
In order to replicate:
We have either use a controller, or use the
defaults
method:However, it'd be nice to be able to pass the view data directly using the
data
method:Or passing the data along with the
view
method: