U
U
usersuser2017-03-07 22:55:49
Laravel
usersuser, 2017-03-07 22:55:49

How to remove question mark at the end of url in Laravel?

I'm trying to link to a page:

<?php
    echo link_to_route('posts', $title = 'Published', null,null);
    echo link_to_route('posts.unpublished', $title = 'unPublished', null,null);
    ?>

routes.php file:
Route::get('/', '[email protected]');
get('/',['as'=>'posts','uses'=>'[email protected]']);
get('unPublished',['as'=>'posts.unpublished','uses'=>'[email protected]']);

But links are formed with a question mark at the end, like : laravelbasic? , laravelbasic/unPublished?
Version 5.1
How can I get rid of this? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tesla, 2017-03-08
@Tesla

Write your own link helper.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question