Class User
/**
* Get the phone record associated with the user.
{ | |
"private": true, | |
"scripts": { | |
"prod": "gulp --production", | |
"dev": "gulp watch" | |
}, | |
"devDependencies": { | |
"gulp": "^3.9.1", | |
"jquery": "^3.1.0", | |
"laravel-elixir": "^6.0.0-14", |
[ | |
// Sublime Menus | |
{ "keys": ["super+k", "super+t"], "command": "title_case" }, | |
{ "keys": ["alt+super+w"], "command": "toggle_setting", "args": {"setting": "word_wrap" }}, | |
{ "keys": ["shift+alt+super+w"], "command": "wrap_lines" }, | |
// PHP Companion | |
{ "keys": ["f9"], "command": "expand_fqcn" }, | |
{ "keys": ["shift+f9"], "command": "expand_fqcn", "args": {"leading_separator": true }}, | |
{ "keys": ["f10"], "command": "find_use" }, | |
{ "keys": ["f8"], "command": "import_namespace" }, |
{ | |
"codeformatter_debug": false, | |
"codeformatter_php_options": { | |
"syntaxes": "php", // Syntax names which must process PHP formatter | |
"php_path": "/usr/local/opt/php71/bin/php", // Path for PHP executable, e.g. "/usr/lib/php" or "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments | |
"format_on_save": false, // Format on save. Either a boolean (true/false) or a string regexp tested on filename. Example : "^((?!.min.|vendor).)*$" | |
"php55_compat": false, // PHP 5.5 compatible mode | |
"psr1": false, // Activate PSR1 style | |
"psr1_naming": false, // Activate PSR1 style - Section 3 and 4.3 - Class and method names case |
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateCountriesTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
<?php | |
use Illuminate\Database\Seeder; | |
class CountriesTableSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. | |
* | |
* @return void |
<?php | |
return [ | |
// If true, the uploaded file will be renamed to uniqid() + file extension. | |
'rename_file' => true, | |
// If rename_file set to false and this set to true, then non-alphanumeric characters in filename will be replaced. | |
'alphanumeric_filename' => true, | |
// If true, non-alphanumeric folder name will not be allowed. | |
'alphanumeric_directory' => false, |
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateUsersTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\SoftDeletes; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
use Illuminate\Notifications\Notifiable; | |
use Nissi\Traits\FormatsName; | |
use Nissi\Traits\HasAccessLevel; | |
use Nissi\Traits\HasAvatar; |
<?php | |
use Illuminate\Support\Facades\Validator; | |
// Add to AppServiceProvider's boot method | |
Validator::extend('us_phone', function ($attribute, $value, $parameters, $validator) { | |
return format_phone($value); | |
}); |