Skip to content

Instantly share code, notes, and snippets.

@coreywelch
coreywelch / Password.php
Created May 5, 2016 20:44
Password Hashing Class
<?php
class Password
{
private $options = ['cost' => 10];
public function make($password)
{
$hash = password_hash($password, PASSWORD_BCRYPT, $options);
@coreywelch
coreywelch / LowercaseRoutes.php
Last active April 28, 2023 19:19
Here is a middleware class for laravel 5 that takes incoming routes and forces them to lowercase.
<?php
namespace App\Http\Middleware;
use Closure;
use \Illuminate\Support\Facades\Redirect;
class LowercaseRoutes
{
/**