I’m receiving this error for some odd reason:
Fatal error: Class 'crud_model' not found in /application/models/shared_model.php on line 3
From this line:
class Shared_model extends crud_model {
Which has worked before in the past. Does anyone know what may be occuring here? The file is the respective folder, it’s spelled correctly, and I’ve event tried the following with no positive results.
class Shared_model extends Crud_model {
and
class Shared_model extends Crud_Model {
Here is crud_model.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Crud_model extends CI_Model {
public $table_name;
public $pk;
public function __construct()
{
parent::__construct();
}
Here is shared_model.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Shared_model extends Crud_model {
public function __construct()
{
parent::__construct();
$this->pk = 'id';
$this->table_name = 'shares';
}
Make sure all your extended classes extend from the proper parent class, this might be the issue or you can load any dependent models to your parent.