Welcome Guest, Not a member yet? Register   Sign In
potentially polymorphic call with model instance inside model function
#6

(This post was last modified: 10-31-2022, 02:51 PM by kenjis.)

<?php

namespace App\Models;

I cannot reproduce the warning.
I got no warning.

PHP Code:
use CodeIgniter\Model;

class 
Sale extends Model
{


PHP Code:
<?php

namespace App\Models;

use 
CodeIgniter\Model;

class 
Test extends Model
{
    public function get_value(): int
    
{
        $sale model('Sale');

        return $sale->get_quote_number_for_year();
    }


I don't know why you got the warning.
Reply


Messages In This Thread
RE: potentially polymorphic call with model instance inside model function - by kenjis - 10-31-2022, 02:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB