• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Undefined property: App\Controllers\Home::$input

#1
Hello there,
I am encountering this error and I have no clue why!  Confused Angry
Code:
ErrorException
Undefined property: App\Controllers\Home::$input


PHP Code:
<?php namespace App\Controllers;

class 
Home extends BaseController
{

    public function 
index()
    {
        $validation =  \Config\Services::validation();
        $view['partner'] = NULL;

        
$partners = array('test','test2');
        
$partner $this->input->get('partner');

        if(
in_array($partner$partners))
        
    $view['partner'] = $partner;

        return view('home'$view);
    }

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




I'd appreciate it if someone could assist me.
Reply

#2
That's because there is no input class now, it is now IncomingRequest Class

You can read about it here:

CodeIgniter 4 User Guide - IncomingRequest Class
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.