Created
June 17, 2017 05:04
-
-
Save henryonsoftware/96ae03fbce22093058aad48568fbab96 to your computer and use it in GitHub Desktop.
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 | |
public function checkIdol($name) | |
{ | |
if ($name == '') { | |
$this->error = "Tên không được để rỗng"; | |
return false; | |
} | |
$validate = $this->validation($name); | |
if (!$validate) { | |
$this->error = "Tên không hợp lệ"; | |
return false; | |
} | |
$dien_vien = DienVien::where('ten', 'likes', $name)->get(); | |
if ($dien_vien->isEmpty()) { | |
$this->error = "Không tìm thấy diễn viên"; | |
return false; | |
} | |
return true; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment