Skip to content

Instantly share code, notes, and snippets.

View eskrano's full-sized avatar
🇺🇦
Focusing

alex eskrano

🇺🇦
Focusing
View GitHub Profile
<?php
namespace App\Http\Controllers;
use App\ReaccessAccount;
use App\User;
use App\UserInfo;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
use Validator;
@eskrano
eskrano / url_slug.php
Created November 9, 2015 17:48 — forked from sgmurphy/url_slug.php
URL Slugs in PHP (with UTF-8 and Transliteration Support)
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.