public function finish()
    {
        if ($this->request->data()) {
            if (rename(ROOT . '/config/settings.php.tmp', ROOT . '/config/settings.php')) {
                snapshot();
                $this->request->session()->delete('Startup');

                if (!empty($this->request->data['home'])) {
                    $this->redirect('/');
                } else {
                    $this->redirect('/admin');
                }
            } else {
                $this->Flash->danger(__d('installer', 'Unable to continue, check write permission for the "/config" directory.'));
            }
        }

        $this->title(__d('installer', 'Finish Installation'));
    }
public function finish()
    {
        if ($this->request->data()) {
            if (rename(ROOT . '/config/settings.php.tmp', ROOT . '/config/settings.php')) {
                snapshot();
                $this->request->session()->delete('Startup');

                if (!empty($this->request->data['home'])) {
                    $this->redirect('/');
                } else {
                    $this->redirect('/admin');
                }
            } else {
                $this->Flash->danger(__d('installer', 'Unable to continue, check write permission for the "/config" directory.'));
            }
        }

        $this->title(__d('installer', 'Finish Installation'));
    }
public function finish ( ) { if ( $ this -> request -> data ( ) ) { if ( rename ( ROOT . '/config/settings.php.tmp' , ROOT . '/config/settings.php' ) ) { snapshot ( ) ; $ this -> request -> session ( ) -> delete ( 'Startup' ) ; if ( ! empty ( $ this -> request -> data [ 'home' ] ) ) { $ this -> redirect ( '/' ) ; } else { $ this -> redirect ( '/admin' ) ; } } else { $ this -> Flash -> danger ( __d ( 'installer' , 'Unable to continue, check write permission for the "/config" directory.' ) ) ; } } $ this -> title ( __d ( 'installer' , 'Finish Installation' ) ) ; }
Last step of the installation process.

Here we say "thanks" and redirect to site's frontend or backend.

@return void
Last step of the installation process .