Tuesday, March 31, 2015

Re: Creating a dev environment

Hi,

    Copy the same folder to ur development server, take structural dump of the application db and restore it on the dev server. Now go to Application/app/Config/database.php in Dev server and change the dbusername and password. Now your app is ready on Dev server. You can use svn or git for using it for development.

Regards,
Guru Prasad.K.V
Let's be realistic, demand the impossible!

On Apr 1, 2015 4:23 AM, "Job Job Resume" <jobjobweb@gmail.com> wrote:
Hi

I have my site up and running, but it was done by another developer, i am not too familiar with this yet.

But i want to duplicate the site so i have a developer environment that i can use for testing out changes I make.

How can i do this?

Thanks SO much for the help.

JJR

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Creating a dev environment

Hi

I have my site up and running, but it was done by another developer, i am not too familiar with this yet.

But i want to duplicate the site so i have a developer environment that i can use for testing out changes I make.

How can i do this?

Thanks SO much for the help.

JJR

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: Very basic question about the 'CakePHP Project Files'

hi, 
sorry for late answer
after i visit your site, maybe no problem with your cakephp app, maybe it's just wrong data parsing to google map api, not in your CakePPH application.
 var mapProp = {
  center:new google.maps.LatLng(Lat_DataLng_Data),
  zoom: 7,
  mapTypeId: google.maps.MapTypeId.ROADMAP
};

where Lat_Data and Lnd_Data is your client location from your Databasename.clientTable, not 5253 Murray Bridge location.

'bout radio button, maybe developer set dafault input of radio button to 'the city only', but that's normal behavior for radio buton to select one options as default input.



On Thursday, March 26, 2015 at 4:08:42 PM UTC+7, rogerdw...@gmail.com wrote:
Hi guys, I searched out this group to get a definite answer to my dilemma. I am an end user  ...  not a programmer.

I had a CakePHP site built and delivered but there a few small issues with it.

The long and short of it is that after I had made the final payment and it was transferred to my own server, I asked for some minor issues to be fixed.

After dragging their feet and pretty much ignoring me, I approached other programmers to see if they could finish it off.

They told me that they need access to the 'cake project file' to continue any work  ...  but the web development team say that it is not their company policy to provide that.

Apart from the fact that it feels like I'm being held to ransom  ... especially after I paid the agreed price, plus a bit more  ...  they are not doing the work and my site is un-useable.

Can anyone offer any (helpful) advise please. :)

Thanks,  Roger

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: CakePHP 3.0 - Confusion comes from

Got it  Thanks

On Tue, Mar 31, 2015 at 6:49 PM, Farid Aditya <farid.aditya@gmail.com> wrote:
no cookbook tutorial/example is fine
maybe
$this->Model->newEntity(); is to create  new object with blank attribute or create blank object container
$this->Model->patchEntity($oldObjectAttr , $newObjAttr); is to update object attribute 

On Friday, March 27, 2015 at 9:37:26 PM UTC+7, Bayezid Alam wrote:
Hi,

A confusion comes on my mind regarding the adding something on CakePHP 3.0

As example given on below link's in the add function.

public function add()      {          $article = $this->Articles->newEntity(); // A blank newEnttity added stored in $article variable          if ($this->request->is('post')) {              $article = $this->Articles->patchEntity($article, $this->request->data); // A patchEntity added here & passed the request data here              if ($this->Articles->save($article)) {                  $this->Flash->success(__('Your article has been saved.'));                  return $this->redirect(['action' => 'index']);              }              $this->Flash->error(__('Unable to add your article.'));          }          $this->set('article', $article);      }


But i found a different things on below link

public function add()      {          $user = $this->Users->newEntity($this->request->data); // request data passing through newEntity here          if ($this->request->is('post')) {              if ($this->Users->save($user)) {                  $this->Flash->success(__('The user has been saved.'));                  return $this->redirect(['action' => 'add']);              }              $this->
...

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: CakePHP 3.0 - Confusion comes from

no cookbook tutorial/example is fine
maybe
$this->Model->newEntity(); is to create  new object with blank attribute or create blank object container
$this->Model->patchEntity($oldObjectAttr , $newObjAttr); is to update object attribute 

On Friday, March 27, 2015 at 9:37:26 PM UTC+7, Bayezid Alam wrote:
Hi,

A confusion comes on my mind regarding the adding something on CakePHP 3.0

As example given on below link's in the add function.

public function add()      {          $article = $this->Articles->newEntity(); // A blank newEnttity added stored in $article variable          if ($this->request->is('post')) {              $article = $this->Articles->patchEntity($article, $this->request->data); // A patchEntity added here & passed the request data here              if ($this->Articles->save($article)) {                  $this->Flash->success(__('Your article has been saved.'));                  return $this->redirect(['action' => 'index']);              }              $this->Flash->error(__('Unable to add your article.'));          }          $this->set('article', $article);      }


But i found a different things on below link

public function add()      {          $user = $this->Users->newEntity($this->request->data); // request data passing through newEntity here          if ($this->request->is('post')) {              if ($this->Users->save($user)) {                  $this->Flash->success(__('The user has been saved.'));                  return $this->redirect(['action' => 'add']);              }              $this->
...

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Re: CakePHP 2 v CakePHP 3 SQL

Hopefully from our previous messages you can guess it yourself:

$options = array(
                
'conditions' => array(
                    
'Rentals.id' => $id,

                    
),
                    
'contain' => array(
                        
'Trailers' => array(

                            
'fields' => array('id', 'number', 'make', 'year', 'license', 'vin', 'skirt')
                        
),
                        
'Lessees' => array(
                            
'fields' => array('id', 'account', 'name', 'address_1', 'address_2', 'city', 'state', 'zip_1', 'zip_2')
                        
)
                    
)
                
);


            $rental
 = $this->Rentals->find('all', $options)->first();

You can also use the where(), select() and contain() methods if you prefer not using an array.

On Monday, March 30, 2015 at 10:29:40 PM UTC+2, Dave Edwards wrote:
BUMP!

On Tuesday, 24 March 2015 20:33:49 UTC, Dave Edwards wrote:
Thanks for the reply,

That being the case, I am pleasantly surprised that despite the documentation making a big play on how different the new ORM is, I can (if I choose) create my queries in much the same way.

The example I posted was a effectively a find 'all' (paginated using a limit clause). What about a find first, is this still as straightforward? Here is an example from the same controller, how would that translate please?


            $options = array(
               
'conditions' => array(
                   
'Rental.id' => $id,
                   
),
                   
'contain' => array(
                       
'Trailer' => array(
                           
'fields' => array('id', 'number', 'make', 'year', 'license', 'vin', 'skirt')
                       
),
                       
'Lessee' => array(
                           
'fields' => array('id', 'account', 'name', 'address_1', 'address_2', 'city', 'state', 'zip_1', 'zip_2')
                       
)
                   
)
               
);


            $this
->request->data = $this->Rental->find('first', $options);

Dave

On Tuesday, 24 March 2015 13:04:21 UTC, Dave Edwards wrote:
Here is a sample of some code I use in a Trailer rental application. This is a method from the Rental Controller.

Rental hasMany Trailers and hasMany Lessees

public function archived($id = null) {


        $options
= array(
         
'limit' => 10,
         
'order' => 'Trailer.number ASC',
         
'fields' => array('id', 'trailer_id', 'lessee_id', 'date_out', 'rented', 'agreement_number'),
         
'conditions' => array(
             
'Rental.deleted' => '1',
         
),
         
'contain' => array(
             
'Trailer' => array(
                 
'fields' => array('id', 'number', 'make', 'license'),
             
),
             
'Lessee' => array(
                 
'fields' => array('id', 'account', 'name'),
             
)
         
)
       
);


        $this
->paginate = $options;
        $this
->set('rentals', $this->paginate());
 
}


Turning off recursive, and using Containable provides a very flexible and readable method of building a query. Adding conditions, fields, associated models etc is a snip. Whoever produced this method of working should be fully credited.

My question is, how would something like this be created in CakePHP 3? There seem to be many many more pages to read and understand regarding the new ORM, and I'm really unsure how simple it will be to convert. Will I be able to achieve it in the a similar manner, and will it be as readable, and easy to edit?

Are there any examples in the new Manual (I can't find any), where the new ORM is used to bring all the new methods of working together in much the same way as the method above?

Thanks

Dave

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.