PHP – CodeIgniter how to create and use a model

MacBook avec code sur un bureau

Looking at the structure of CodeIgniter we see that there is a folder called application/models. It is in this one that we will create our model. For a model to be usable as such, it must extend CI_Model. class ScoresModel extends CI_Model { function __construct(){ // Call the Model constructor parent::__construct(); $this->load->database(); } function getAllScores(){ … Read more

PHP – Create a REST API with CodeIgniter

Code sur écran d'ordinateur

Introduction CodeIgniter is a fairly simple framework for PHP. Compared to its big brothers such as Zend or Yii, it has the advantage of being small and very simple to get to grips with. For me, currently the best for small projects such as creating a REST-API. Installation To start, go download the official version … Read more