jeudi 10 novembre 2016

How to get last part of url in blade file (HTML) laravel 5.2?

I am new to laravel. I want to get the last part of my url in the blade file(HTML file). I have done this one using php functionality . Is there any way I can get it using any laravel functionality .

Below is my code ,its working fine

<?php
$url = url()->current();
echo $end = end((explode('/', $url)));
?>

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire