Newbie Question about the official codeigniter.com tutorial. |
Hi All,
I have been following the Codeigniter tutorial for beginners and had no issues till I finished this page: https://codeigniter.com/user_guide/tutor...ction.html where I got the following error. Can anyone tell me why this is happening and how to fix it please?: “… ParseError syntax error, unexpected token "public", expecting end of file APPPATH/Models/NewsModel.php at line 12 5 use CodeIgniter\Model; 6 7 class NewsModel extends Model 8 { 9 protected $table = 'news'; 10 } 11 12 public function getNews($slug = false) 13 { 14 if ($slug === false) { 15 return $this->findAll(); 16 } 17 18 return $this->where(['slug' => $slug])->first(); 19 } …” |
Welcome Guest, Not a member yet? Register Sign In |