Support the ongoing development of Laravel.io →
posted 8 years ago
Requests

I have link i created for editing post but the out looks gibberish

href="http://web.app/admin/blog/post/post_id%20=%3E%20%24post_id/edit

When it should be

href="http://web.app/admin/blog/post/2/edit

URL

<a href="{{ route('admin.blog.post.edit', ['post_id => $post_id']) }}">Edit</a>

Route

Route::get('/blog/post/{post_id}/edit', [
        'uses'  => 'PostController@getUpdatePost',
        'as'    => 'admin.blog.post.edit'
    ]);
Last updated 3 years ago.
0

That is what you get when the link for the route is wrong. You have

<a href="{{ route('admin.blog.post.edit', ['post_id => $post_id']) }}">Edit</a>

and it needs to be

<a href="{{ route('admin.blog.post.edit', ['post_id' => $post_id]) }}">Edit</a>

small differences and easy to miss

0

Thanks for the tip my bad :)

0

Sign in to participate in this thread!

PHPverse

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.

© 2025 Laravel.io - All rights reserved.