ExpressiveDate::make PHP Method

make() public static method

Make and return new ExpressiveDate instance.
public static make ( string $time = null, string | DateTimeZone $timezone = null ) : ExpressiveDate
$time string
$timezone string | DateTimeZone
return ExpressiveDate
    public static function make($time = null, $timezone = null)
    {
        return new static($time, $timezone);
    }

Usage Example

	<div class="row">
		<div class="col-md-6">
			<h4>Signups {{ $signupStatusLabel }}</h4>
		</div>
		<div class="col-md-6">
			<h4 class="pull-right">{{ $signupRelativeTime }}</h4>
		</div>
	</div>
	<hr>

	@if(count($event->users))
		<?php 
$tableBody = array();
foreach ($event->users as $user) {
    $tableBody[] = array('user' => '<a href="' . URL::route('user.show', $user->id) . '">' . HTML::userAvatar($user) . ' ' . e($user->username) . '</a>', 'signup-time' => ExpressiveDate::make($user->pivot->created_at)->getRelativeDate());
}
?>
		{{ Table::open(array('class' => 'signups')) }}
		{{ Table::headers('User', 'Signed Up') }}
		{{ Table::body($tableBody) }}
		{{ Table::close() }}
	@else
		<p>No users signed up!</p>
	@endif
	@if( Auth::check() )
		@if( !$event->users->contains(Auth::user()) AND $signupTimespan->status === 1)
			{{ Button::link(URL::route('event.join', array('event' => $event->id)), 'Join') }}
		@elseif( $event->users->contains(Auth::user()) )
			{{ Button::link(URL::route('event.leave', array('event' => $event->id)), 'Leave') }}
		@endif
All Usage Examples Of ExpressiveDate::make