Why do we need declare $slug
argument as default NULL
in the function?
What will change if we won't declare it default NULL
?
It looks for me like nothing would change:
public function view($slug = NULL)
{
$data['news_item'] = $this->news_model->get_news($slug);
if (empty($data['news_item']))
{
show_404();
}
...