Friday, April 2, 2010

Re: Naming convention

Hi,

I have table called more_categories. Now how to declare the model
name, controller name and views folder

Thanks in advance

On Apr 2, 2:45 pm, Ambika Kulkarni <ambikakulkarn...@gmail.com> wrote:
> Hi thanks It Worked
>
> On Fri, Apr 2, 2010 at 2:50 PM, Jeremy Burns <jeremybu...@me.com> wrote:
> > It's not ideal to move away from conventions, but you can use var $useTable
> > = 'myname'; in your Myname model.
>
> > Jeremy Burns
> > jeremybu...@me.com
>
> > On 2 Apr 2010, at 10:17, Ambika Kulkarni wrote:
>
> > > Hi there,
>
> > > I am pretty new to cake.
> > > I am aware of naming conventions in cakePHP as I have created some
> > > more models n controller they are working fine.  Here the table name
> > > itself is in singular name format. And I am not suppose to change the
> > > table name to plural.
>
> > > I am facing a problem while naming the controller name.
>
> > > Here it goes------>
> > > I have a table called myname(id,name)
> > > I created a model as myname.php
> > > <?php
> > > class Myname extends AppModel {
> > >   var $name = 'Myname';
> > > }
> > > ?>
> > > I created a controller as myname_controller.php
> > > <?php
> > > class MynameController extends AppController {
> > >   var $name = 'Myname';
> > >   var $components = array('Auth');
> > >    . . . . . . .
> > > }
> > > ?>
> > > and a view.ctp file
>
> > > I have several tables of singular name.
> > > Please help me...
>
> > > Thanks in advance
> > > :)
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > others with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> > > To unsubscribe, reply using "remove me" as the subject.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: