예제 #1
0
 public function getPostBySlug($slug)
 {
     $post = Posts::findFirstBySlug($slug);
     if (!$post) {
         return null;
     }
     return $post;
 }