Skip to content

Instantly share code, notes, and snippets.

<?php namespace App\Libs\Helper;
use Jenssegers\Date\Date;
class Helper {
/**
* Get Date
*/
public static function getDate($date)
@nullproduction
nullproduction / CachedEloquentUserProvider.php
Last active May 9, 2022 10:31
Caching Auth::user() for Laravel5
<?php namespace App\Providers;
use Illuminate\Contracts\Hashing\Hasher;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Auth\Authenticatable;
class CachedEloquentUserProvider implements UserProvider {
protected $hasher;
protected $model;
@nullproduction
nullproduction / VKServiceProvider.php
Created May 5, 2015 21:27
Пример сервис-провайдера
<?php
namespace App\Libs\VK\Laravel;
use Illuminate\Support\ServiceProvider;
class VKServiceProvider extends ServiceProvider
{
public function register()
{