I have an encrypted URL slug and it's displaying like this http://localhost/pending/$2y$10$r3N01R19/M4UURceDSNGkuEInQ1LQC5OvBoEiugYOhpla8f3wHZU2
.
Now, how do I get the only encrypted slug $2y$10$r3N01R19/M4UURceDSNGkuEInQ1LQC5OvBoEiugYOhpla8f3wHZU2
, in Laravel controller and dump?
Controller
public function pending(Request $request, $enc_code)
{
$slug = $request->get($enc_code);
dd($slug);
}
Route
Route::get('/pending/{enc_code}', 'PagesController@pending')->name('page.pending');
$enc_code
already? – CBroe/
in encrypted slug which assumes there is another slug in URL, now how do I hash variable and omit slash/
– Dominicdd($enc_code);
it should show your slug – Dmitrystr_replace ('/', '', Hash::make($request->get('enc_code')));
to remove forward and it works. – Dominic