app/model/admin/SystemGroup.class.php
/**
     * Add a SystemProgram to the SystemGroup
     * @param $object Instance of SystemProgram
     */
Add a SystemProgram to the SystemGroup
@param $object Instance of SystemProgram
Add a SystemProgram to the SystemGroup @param $object Instance of SystemProgram
public function addSystemProgram(SystemProgram $systemprogram)
    {
        if (SystemGroupProgram::where('system_program_id','=',$systemprogram->id)->where('system_group_id','=',$this->id)->count() == 0)
        {
            $object = new SystemGroupProgram;
            $object->system_program_id = $systemprogram->id;
            $object->system_group_id = $this->id;
            $object->store();
        }
    }
public function addSystemProgram ( SystemProgram $ systemprogram ) { if ( SystemGroupProgram :: where ( 'system_program_id' , '=' , $ systemprogram -> id ) -> where ( 'system_group_id' , '=' , $ this -> id ) -> count ( ) == 0 ) { $ object = new SystemGroupProgram ; $ object -> system_program_id = $ systemprogram -> id ; $ object -> system_group_id = $ this -> id ; $ object -> store ( ) ; } }
Add a SystemProgram to the SystemGroup
 @param $object Instance of SystemProgram
Add a SystemProgram to the SystemGroup @param $object Instance of SystemProgram