Support the ongoing development of Laravel.io →
posted 7 years ago
Requests
Last updated 2 years ago.
0

edit: nevermind

Last updated 7 years ago.
0

hello i think not necessary your router pass parameter this system

Route::group(['prefix' => '/admin'], function(
Route::get('/blog/post/{post_id}/{$end}', [
    'uses'  => 'PostController@getSinglePost',
    'as'    => 'admin.blog.post'
]);

});

because you pass two parameter post_id and end so (&) not necessary . and easily pass two parameter this function

public function getSinglePost($post_id, $end = 'frontend') {


 } 

your write code Route::get('/blog/post/{post_id}&{$end}',

{post_id} one parameter and {end} second parameter laravel route pass parameter {$end} not allow so right code /{post_id}/{end}

thank you

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.