Jump to content


abhishek

Member Since 03 May 2013
Offline Last Active May 13 2013 12:52 PM
-----

#7281 How to pass extra data on a grocery crud view

Posted abhishek on 09 May 2013 - 11:01 AM

I have used a different approach, just copied the set_subject function and it is working fine, so i want to share it with you.

 

Go to grocery crud Library and follow these simple steps:

 

Step1. Declare         

protected $extra = null;

 

Step2.Create function

public function set_extra($extra)
    {        
        $this->extra = $extra;
        return $this;
    }

Step 3.Add this into protected function get_common_data()

$data->extra                 = $this->extra;

 

and now You can pass Value in your controller like

$crud->set_extra('Value');

 

Now you can use  $extra in your view