You could do the following:
// If you are using route model binding
Route::get('post/{post}/helperFunctionCall', function ($post) {
helperFunctionCall($post->id);
});
// If you are not using route model binding and `{post}` in the URL is an ID
Route::get('post/{post}/helperFunctionCall', function () {
helperFunctionCall($post);
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community