Skip to content

Instantly share code, notes, and snippets.

@talha08
Last active March 25, 2016 11:05
Show Gist options
  • Save talha08/9774fae8aa57fbd90f91 to your computer and use it in GitHub Desktop.
Save talha08/9774fae8aa57fbd90f91 to your computer and use it in GitHub Desktop.
Generate String: str_random(limit) //ex: str_random(20)
Or Using String Class: Str::random(60)
...............................................................
Time Difference: return $rightNow = Carbon::now()->diffForHumans(Auth::user()->created_at); // use Carbon/Carbon;
................................................................
For Year Select in Form: Form::selectYear('year', 2011, 2015);
................................................................
For Month Select in Form: Form::selectMonth('month');
................................................................
For DAy Select in Form: Form::selectRange('range', 1, 31);
................................................................
Get Client IP Address: $userIpAddress = Request::getClientIp();
String Limit
.......................
<td>{{str_limit($worker->subject, 15) }}</td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment