Skip to content

Instantly share code, notes, and snippets.

View jhaoda's full-sized avatar

JhaoDa jhaoda

  • Krasnoyarsk, Russia
View GitHub Profile
@jhaoda
jhaoda / stylish.css
Last active August 6, 2019 13:00
Old gitter.im style
@-moz-document domain("gitter.im") {
body {
font-family: 'Open Sans';
font-size: 14px;
}
/* common */
h1, h2, h3, h4, h5 {
line-height: 1;
}
@Kreshnik
Kreshnik / PreventReplayAttack.php
Last active March 29, 2022 11:00
Laravel 5 - PreventReplayAttack Middleware
<?php namespace App\Http\Middleware;
use Carbon\Carbon;
use Closure;
use Illuminate\Cache\Repository as Cache;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Session;
class PreventReplayAttack
{
<?php namespace Backend\Auth;
use Illuminate\Auth\AuthManager as BaseAuthManager;
use Illuminate\Auth\EloquentUserProvider;
class AuthManager extends BaseAuthManager
{
/**
* Create an instance of the Eloquent driver.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@msurguy
msurguy / eloquent.md
Last active February 8, 2022 03:13
Laravel 4 Eloquent Cheat Sheet.

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';