Q:

how can i use url encode Laravel 5.2

i am working in a project and want use the name of a post as URL, then i did this:
Routes.php
Route::get('/{nombre}',['as' => 'noticias.show', 'uses' => 'NoticiasController@show'])->where('nombre', '[A-Za-z0-9-_]+');

and i did this:
Contoller.php
public function show($nombre)
    {
        $Noticia = Noticias::where('nombre', $nombre)->first();
        $Categorias = categoriasn::CategoriaN();
        if(!$Noticia){
            return 'No exite ninguna noticia';
        }
        return view('noticias.noticia')->with(compact('Noticia'))->with(compact('Categorias'));
    }

this is the way i use to call a post, using name, but for example if the post has a space the url show me `%20, and no display the post. 
if someone can help will be awesome. 
Thank you so much. 

A:

Hint
Instead of passing post name of every post, you may use post-slug. 

You can add a extra column on database posts table called post-slug. 
Prepare every post name to post-slug by removing space and a replace dash(-) while saving post.