Last active
June 17, 2017 04:58
-
-
Save henryonsoftware/601043cef3a1c9457e7425a13e52e919 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 != "") { | |
$validate = $this->validation($name); | |
if (!$validate) { | |
$this->error = "Tên không hợp lệ"; | |
return false; | |
} else { | |
$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; | |
} else { | |
return true; | |
} | |
} | |
} else { | |
$this->error = "Tên không được để rỗng"; | |
return false; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment