Wednesday, July 29, 2009

Re: Best way to 'bake' with cake PHP....2 ways I have been told to do it...which is the correct way?

I used a similar approach with cake outside of the document root.

eg:

cd ~
mkdir work
cd work
cake bake myperfectapp

Then I will set this in apache config file, eg: vhosts.conf
DocumentRoot /home/<user>/work/myperfectapp/webroot

This way, we can share the same cake install for different apps.

On Jul 30, 2:54 am, thatsgreat2345 <thatsgreat2...@gmail.com> wrote:
> When I'm setting up a new project I typically use cake bake project as
> it will change the security salt for you and you can setup your db
> config, and all that great stuff right from cake bake. I've done it
> both ways you've said though, copying previous webroots to create my
> new app folder but why bother when just typing a single line, creates
> it all for you there is no point in manually copying it really unless
> you really have to.
>
> On Jul 29, 6:17 am, David <d...@kabaddle.com> wrote:
>
> > Hello,
>
> > Just a simple question about how you initially bake your cakephp
> > application...as I have read through two books and they both did it
> > slightly differently.
>
> > 1. FIRST VERSION....I went to c:/wamp/www> then ran CAKE BAKE .... and
> > created the folder for the new cakephp application which had (locale,
> > plugins, tests, tmp, vendors, webroot, config, models, controllers,
> > views & app_ontroller.php, app_helper.php, app_model.php and
> > index.php) all these files in the main folder I just created via CAKE
> > BAKE in.
>
> > 2. SECOND VERSION... I manually copy the cake folder and paste it as a
> > new folder/site (obviously change the name to something like
> > 'mynewapp')...then I manually setup the database config file and
> > change the .salt code in the core.php file. THEN i go to  the Cake
> > Bake Console and can create my Models, Controllers and Views.
> > By doing it this way I end up with 3 folders in my main web folder
> > (Vendors, Cake, App) and obviously have all the above files(as
> > mentioned in FIRST VERSION) in the 'app' folder.
>
> > So which way is correct? or are both correct?
>
> > How do you do it? or do you just use Cake Bake to create a certain
> > aspect of your cakePHP project, such as you only use it to create the
> > controllers ? or Models ? or Views? or do you not use it at all????
>
> > ANY HELP AND ADVICE WILL BE MUCH APPRECIATED
>
> > MANY THANKS
> > DAVID
>
>
--~--~---------~--~----~------------~-------~--~----~
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: