function __construct($post_id = null) { parent::__construct(DB::table('postinfo'), "post_id", $post_id); // call parent with appropriate parameters }