Welcome Guest, Not a member yet? Register   Sign In
Model - no data to update
#6

(This post was last modified: 07-10-2019, 04:48 PM by InsiteFX.)

TestModel:

PHP Code:
<?php namespace Modules\Test\Models;

/**
 * -----------------------------------------------------------------------
 * Class        TestModel
 *
 * @project     ci4admin
 * @author      Raymond L King Sr.
 * @link        https://www.procoversfx.com
 * @copyright   Copyright (c) 2009 - 2019 Custom Software Designers, LLC.
 * @license     https://www.procoversfx.com/license
 * -----------------------------------------------------------------------
 */

use CodeIgniter\Model;

class 
TestModel extends Model
{
 
   /**
     * Class properties go here.
     * -------------------------------------------------------------------
     * public, private, protected, static and const.
     */


 
   /**
     * Name of database table
     *
     * @var string
     */
 
   protected $table 'tableName';

 
   // -------------------------------------------------------------------

 
   /**
     * __construct ()
     * -----------------------------------------------------------------------
     *
     * Class    Constructor
     *
     * NOTE: Not needed if not setting values or extending a Class.
     *
     */
 
   public function __construct()
 
   {
 
       parent::__construct();
 
   }

 
   // -----------------------------------------------------------------------

  // End of TestModel Model Class.

/**
 * -----------------------------------------------------------------------
 * Filename: TestModel.php
 * Location: ./Modules/Test/Models/TestModel.php
 * -----------------------------------------------------------------------
 */ 

A test model for setting up a model in modules.

I have code templates made up in my phpStorm for everything, like above model.

You can setup the other variables from CodeIgniter's model in your new model.

I try to use Entity Classes for my models, Entity Class is a good read in the User Guide.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Model - no data to update - by Nome - 07-08-2019, 07:59 AM
RE: Model - no data to update - by InsiteFX - 07-08-2019, 08:16 AM
RE: Model - no data to update - by Nome - 07-08-2019, 01:37 PM
RE: Model - no data to update - by InsiteFX - 07-09-2019, 02:42 AM
RE: Model - no data to update - by Nome - 07-09-2019, 03:14 AM
RE: Model - no data to update - by InsiteFX - 07-10-2019, 04:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB