This file contains hidden or 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 | |
echo ((true&&true)?'true<br>':'false<br>'); | |
echo ((true&&false)?'true<br>':'false<br>'); | |
echo ((false&&true)?'true<br>':'false<br>'); | |
echo ((false&&false)?'true<br>':'false<br>'); | |
/* | |
true | |
false | |
false | |
false |
This file contains hidden or 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
pmset -g | |
log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h | |
//mdworker disable | |
sudo mdutil -a -i off | |
//mdwork enable | |
sudo mdutil -a -i on |
This file contains hidden or 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
trait UuidTrait | |
{ | |
/** | |
* Defines the UUID field for the model. | |
* @return string | |
*/ | |
protected static function uuidField() | |
{ | |
return 'uuid'; | |
} |
This file contains hidden or 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
/** | |
* 주민번호 생성기 | |
* 사용예) jumin() | |
* jumin({year:1990, month:3, day: 12, loop: 10}); //1990년 3월 12일생 10개 주민번호 생성. | |
* 확인예) jumin.verify(확인할 주민번호) 확인할 주민번호는 - 있어도 없어도 무관. 13자리만 맞추면 됨. | |
* @param {object} options 옵션 | |
* year: 년도, 빈 값으면 랜덤 | |
* month: 월, 빈 값이면 랜덤 | |
* day: 일, 빈 값이면 랜덤 | |
* loop: 생성개수, 빈 값이면 1개 생성. |
This file contains hidden or 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
//Role 지정 | |
$user->assignRole('관리자') | |
//$user의 모든 roles 리턴 | |
$user->roles()->pluck('name'); | |
//Role 삭제 | |
$user->removeRole('writer'); |
This file contains hidden or 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
//controller에서 패스워드를 인코딩할 필요없이 모델에서 적용 | |
public function setPasswordAttribute($password) | |
{ | |
$this->attributes['password'] = bcrypt($password); | |
} | |
public function getPasswordAttribute($password) | |
{ | |
return bcrypt($password); | |
} |
This file contains hidden or 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
robocopy h: f: /mir /w:1 r:1 & shurdown -s -f -t 0 |
This file contains hidden or 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
$history[Carbon::now()->toDateTimeString()] = [ | |
"title" => "무통장입금 저장", | |
"application_no" => $application_no, | |
"discount_id" => $discount_id, | |
"discount_code" => $discount_code, | |
"premium_expect" => $premium_expect, | |
"account_id" => $account_id, | |
"account_name" => $account_name, | |
]; |
This file contains hidden or 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 | |
/** @var \Illuminate\Support\ViewErrorBag $errors */ | |
@endphp |
This file contains hidden or 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
try { | |
// | |
} catch (\Exception $e) { | |
return $e->getMessage(); | |
} |