September 5, 2020
Category : Laravel
How to Get URL Segment in Laravel?
Whenever you need to get current url segment then you can get using Request facade. I give you example one for using Request facade. so you can get segment from url and how you can see both example.
Example:
@extends('layouts.app')
@section('content')
{{ Request::segment(1) }}
@endsection

Hardik Savani
I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.