Skip to content

Instantly share code, notes, and snippets.

View sunshain's full-sized avatar

RM sunshain

  • Single Person
  • Universe, Milky Way
View GitHub Profile
@sunshain
sunshain / AppServiceProvider.php
Last active April 14, 2016 10:50
Laravel custom Validation (mimetypes from url)
<?php
namespace App\Providers;
use Validator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
@sunshain
sunshain / helpers.md
Last active April 22, 2016 11:45
Laravel helpers, which are not written in the documentation.

Laravel helpers, which are not written in the documentation.

Support

append_config(array Array)
  • @return array
  • Assign high numeric IDs to a config item to force appending.
<?php
/*
* add to config/app.php providers
* App\Providers\ValidationProvider::class,
*
* add to lang/validation.php
* 'currented' => 'The current password is not correct.',
*/