public function delete($moe) { $moe->send(array('result' => Post::instance()->findByPK($moe->get('GET.id'))->findById_author(Auth::data('id_author'))->get(1)->delete())); }
public function __construct($moe) { $moe->copy('app.name', 'pageTitle'); $moe->set('menu', ['home' => 'Home', 'sitemap' => 'Sitemap', 'about' => 'About']); $moe->set('external', ['https://github.com/eghojansu/moe' => 'eghojansu/moe', 'http://fatfreeframework.com' => 'Fatfree Framework', 'https://github.com' => 'Github', 'http://packagist.org' => 'Packagist']); $post = Post::instance(); $moe->set('populars', $post->popularList()); $moe->set('archives', $post->archiveList()); }