This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//hook access_token | |
add_action('wo_set_access_token','wo_process_example'); | |
function wo_process_example( $data ){ | |
if( isset( $data ) ){ | |
} | |
// do something without the data | |
} | |
do_action('wo_endpoint_user_authenticated', array( $token ) ); | |
function add_allow_header( $headers ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$password = Auth::user()->password; | |
$this->validate($request,[ | |
'old_password' => "required|check_password:$password", | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//bootは最初からあるので、追記する | |
public function boot() | |
{ | |
Validator::extend('check_password', 'App\Validation\OldPassWordValidator@oldPassword'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Validation; | |
use Hash; | |
class oldPasswdValidator | |
{ | |
public function oldPassword($attribute, $value, $parameters) | |
{ | |
return Hash::check($value, $parameters[0]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->validate($request,[ | |
'password' => 'required|min:8', | |
'password_confirm' => 'required|same:password', | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'custom' => [ | |
'attribute-name' => [ | |
'rule-name' => 'custom-message', | |
], | |
'password' => [ | |
'required' => 'パスワードは必須です', | |
'min' => '8文字以上で入力してください' | |
], | |
'password_confirm' => [ | |
'required' => 'パスワードを再入力してください', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ $errors->first('password')}} | |
<input name ="password" type="password"> | |
{{ $errors->first('password_confirm')}} | |
<input name ="password_confirm" type="password"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
● MongoDBインストール | |
yum install mongodb-org | |
●自働起動 | |
chkconfig mongod on | |
●epelリポジトリ | |
yum install -y epel-release | |
●wget インストチェック |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mongodb-org-3.2] | |
name=MongoDB Repository | |
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ | |
gpgcheck=0 | |
enabled=1 |