public static function posts($data) { $posts = PostModel::all(); if (count($posts)) { View::show('posts', $posts); } else { View::error('There is no posts'); } }
public static function index($data) { View::show('index'); }