LaravelURI

Summary

No protected properties found
N/A
No private methods found
No private properties found
N/A
File
uri.php
Package
Default
Class hierarchy
LaravelURI

Tags

None found

Properties

$uri

$uri : string

The URI for the current request.

Type

string

Tags

None found

$segments

$segments : array

The URI segments for the current request.

Type

array

Tags

None found

Methods

full()

full() : string

Get the full URI including the query string.

Returns

string

static

Tags

None found

current()

current() : string

Get the URI for the current request.

Returns

string

static

Tags

None found

is()

is(string  $pattern) : boolean

Determine if the current URI matches a given pattern.

Parameters

string $pattern

Returns

boolean

static

Tags

None found

segment()

segment(integer  $index, mixed  $default = null) : string

Get a specific segment of the request URI via a one-based index.

// Get the first segment of the request URI $segment = URI::segment(1);

// Get the second segment of the URI, or return a default value
$segment = URI::segment(2, 'Taylor');

Parameters

integer $index
mixed $default

Returns

string

static

Tags

None found

format()

format(string  $uri) : string

Format a given URI.

Parameters

string $uri

Returns

string

static

Tags

None found

segments()

segments(string  $uri) : void

Set the URI segments for the request.

Parameters

string $uri

static

Tags

None found