Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:44:50+00:00 2026-06-18T01:44:50+00:00

I am trying to understand some fundamental aspects of CakePHP, I successfully completed the

  • 0

I am trying to understand some fundamental aspects of CakePHP, I successfully completed the blog tutorial (I am doing the 1.3 version because the project I need to work on is a legacy CakePHP1.3 app), and just to test my skills I setup a new, bare bones model, view and controller under the same project with the structure and code below.

What I don’t understand is when I run this via localhost/foo/info/, while the address loads, the page reports it is looking for a database table called ‘foos’. If I add the table called ‘foos’, the page loads fine. But what I don’t understand is what would I have to do so I can run this same code independently of the database? In other words, so it runs without any database table called foos. I don’t understand where in the code below there is a request for a ‘foos’ table.

/app/models/foo.php

<?php
class Foo extends AppModel
{

}
?>

/app/views/foo/info.ctp

<!-- File: /app/views/foo/info.ctp -->

<h1>Info page</h1>

<p>This is an info page</p>

/app/controllers/foo_controller.php

<?php
class FooController extends AppController {
    var $name = 'Foo';

    function info() {
    }
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:44:51+00:00Added an answer on June 18, 2026 at 1:44 am

    In model: public $useTable = false;

    OR

    In controller: public $uses = array();

    Further reading:

    http://book.cakephp.org/2.0/en/models/model-attributes.html

    http://book.cakephp.org/2.0/en/controllers.html#Controller::$uses

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to understand some fundamental best practices using Entity Framework. My EDM design
I am now trying to understand some code and I have found a pattern,
I'm trying to understand some MATLAB source codes. I don't know exactly which one
This might be difficult to answer. I am trying to understand some codebase and
I have some legacy C++ code that I am trying to understand a bit
I’m trying to understand code from http://www.yesodweb.com/book/conduits . After some fixes (like replacing Resource
I am trying to understand the Javascript event handling. I like some code to
I've in inherited some code that I'm trying to understand and any searching I
I'm trying to understand how ID3 tags work, so, after reading some documentation, I
I am trying to fully understand the process pro writing code in some language

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.