php - Passing values between Controllers and Views -
i working within person's project framework , lack of experience using mvc problematic. controller's index()
passes value view via $data
variable, view has urls trigger other functions in controller.
when 1 of these urls clicked, need value controller function being called. don't want pass in url , wondering if there other way so?
example controller function need pass value to:
public function ftp($request = null) { $data['title'] = 'ftp'; $data['page'] = 'services'; \helpers\session::set('template', 'default'); if (!session::get('user')) { url::redirect(''); } else { $data['request'] = $request; $data['baseurl'] = '/site/'.$request.'/'; $this->view->render('site/ftp',$data); } }
Comments
Post a Comment