free hit counter

How to debug SQL queries from a controller in cakePHP

How to debug SQL queries from a controller in cakePHP
  Debug SQL queries from a controller in cakePHP Getting last query on CakePHP when you need to exit in the middle of the action is pretty annoying. You would usually do a function where the dataSource would be instantiated and then you would access the queryLog. $log = $this->Model_name->getDataSource()->getLog(false, false); debug($log);

Remove Cakephp Model Field Validation from Controller

Remove Cakephp Model Field Validation from Controller
  in Cakephp we set all validation in model ! but many time we didn’t need some validation for particular field ! in that condition  how to remove that validation ? its very simple , you need to write some line in controller   //Remove only Single Rule of a field       $this->User->validator()->remove(‘phone’, ‘rule1′);       //Completely remove all validation rules of  a field       $this->User->validator()->remove(‘phone’);     First Line of ...

CakePHP V/s other frameworks 2

CakePHP V/s other frameworks
CakePHP V/s Symfony URL : http://symfony.com CakePHP VS Symfony Compariosn Both CakePHP and Symfony are excellent frameworks for developing robust web applications. Analysing their pros & cons helps you choose the best out of these. CakePHP v/s Symfony – A Quick Comparison To Help Developers Choose The Best Framework! PHP based frameworks such as CakePHP ...

CakePHP Framework

CakePHP Framework
CakePHP – Rapid Application Development Framework CakePHP is a rapid web application development framework powered by the popular PHP language. Using CakePHP, developers can easily build scalable applications as per different needs. CakePHP, A Solid MVC Architecture Based Open Source Framework That Makes Web Application Development A Breeze The CakePHP Framework is an open source ...

Sending Email Using Cakephp via SMPT 2

Sending Email Using Cakephp via SMPT
CakeEmail class CakeEmail(mixed $config = null) CakeEmail is a new class to send email. With this class you can send email from any place of your application. In addition to using the EmailComponent from your controller, you can also send mail from Shells, and Models. This class replaces the EmailComponent and gives more flexibility in sending emails. For example, ...

Validate Form Using Model Without Table In Cakephp 2

Validate Form Using Model Without Table In Cakephp
Validate Form Using Model Without Table In Cakephp (eg- Contact Us form )   Form Validation is an essential task in any online application, its also an incredibly dull, tedious and repetitive task but with CakePHP you can cut down the time and effort you spend validating your form data. In a standard PHP application ...

Encrypt Credit Card Data for Storage in a Database Using PHP

Encrypt Credit Card Data for Storage in a Database Using PHP
One of the issues with working in the software-as-a-service industry is that credit card numbers often have to be stored locally in a database. Keeping it on file with your payment gateway alone has a few limitations. The business folks may request storage for various reasons such as: Recurring subscriptions (often with variable amounts). Customers ...

Get latitude and longitude based on location name google maps api

Get latitude and longitude based on location name google maps api
how to get Latitude and Longitude in Google Maps using PHP   The idea is simple. Make a request to Google Maps server, and it will return an XML (or JSON). Then, parse the XML to get the Lat and Lon. function Get_Lat_lng($address=null)   {   if(!emptyempty($address)){   $prepAddr = str_replace(‘ ‘,‘+’,$address);   $geocode=file_get_contents(‘http://maps.google.com/maps/api/geocode/json?address=’.$prepAddr.‘&sensor=false’);   $output= json_decode($geocode, true);   if($output[‘status’] ==‘OK’)   {   $lat = $output[‘results’][0][‘geometry’][‘location’][‘lat’];   $lng = $output[‘results’][0][‘geometry’][‘location’][‘lng’];   $map_code=array(‘status’=>‘ok’,‘lat’=>$lat,‘lng’=>$lng);   return $map_code;   }   else{   ...

The perfect PHP clean url generator 19

The perfect PHP clean url generator
THE PERFECT PHP CLEAN URL GENERATOR In my hunt for the perfect clean url (smart url, slug, permalink, whatever) generator I’ve always slipped in some exception or bug that made the function a piece of junk. But I recently found an easy solution I hope I could call “definitive”. Clean url generators are crucial for ...

paypal component for cakephp 2

paypal component for cakephp
paypal component for cakephp Hello Friend  many time you use paypal payment using in html (form and its hidden field etc.) But in CakePHP nothing to do . No need to create from . so how to do it .. just follow simple step 1. save this component  in app->controller -> component  floder Download paypal ...