O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — organizing our user views

As we continue to create views for our application, it will be smart for us to have some organization to make sure that we keep things nice and straightforward.

  1. Create a folder called user inside the views directory.
  2. Move the existing signup.php view into this folder. The resulting directory structure will look similar to the following screenshot:
    Time for action — organizing our user views
  3. We need to update index.php and let it know where to find the signup view that we just moved:
    get('/signup', function($app) {
    $app->render('user/signup');
    
    });
    

What just happened?

We cleaned up our views folder structure by creating a user folder, into which we will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required