37 lines
907 B
PHP
37 lines
907 B
PHP
<?php namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class Receipt_model extends Model
|
|
{
|
|
protected $table = 'receipts';
|
|
protected $primaryKey = 'receipt_id';
|
|
|
|
protected $allowedFields = ['receipt_no', 'date','donor_id','amount', 'mode_of_receipt','receipt_details','cause_name', 'remarks'];
|
|
|
|
|
|
|
|
function all_receipt()
|
|
{
|
|
|
|
$builder = $this->db->table('receipts');
|
|
$result = $builder->get();
|
|
$output = $result->getResultArray();
|
|
return $output;
|
|
}
|
|
|
|
|
|
// protected $returnType = 'array';
|
|
// protected $useSoftDeletes = true;
|
|
|
|
|
|
|
|
// protected $useTimestamps = false;
|
|
// protected $createdField = 'created_at';
|
|
// protected $updatedField = 'updated_at';
|
|
// protected $deletedField = 'deleted_at';
|
|
|
|
// protected $validationRules = [];
|
|
// protected $validationMessages = [];
|
|
// protected $skipValidation = false;
|
|
} |