This file contains hidden or 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 | |
function wp_class_register_mb() { | |
add_meta_box( | |
'wpclass-mb', // unique id | |
esc_html__( 'WP Class Metabox', 'text-domain' ), // metabox title | |
'wp_class_mb_cb', // metabox callback | |
array('post','page'), // screen name [string|array] | |
'side', // context | |
'high' // priority | |
); |
This file contains hidden or 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 | |
class PostController extends BaseController{ | |
function create(){ | |
return View::make('posts.create'); | |
} | |
function store(){ | |
DB::table('posts')->insert([ | |
'title'=>Input::get('title'), | |
'body'=>Input::get('body') |