CakePHP | Installasi CakePHP


Haloo Semua'nya akhir" ini saya lagi belajar sama nih framework CakePHP walaupun masih banyak kendala" hehe ,
oke langsung aja deh sama artikel ini Installasi CakePHP , mulai dari awal dulu yak :p
ntar di usahakan update terus kog :) hehe , jadi sering" stay di blog ini yaa hehe

Sebelum terjun langsung ke CakePHP , kalian harus punya peralatan"nya dulu :
  • Installasi Apache dan MySQL di computer local ( install xampp aja kalau ga mau ribet )
  • Menguasai dasar" HTML & CSS ( yang dasar" aja :p )
  • Menguasai PHP intermediate : minimal bisa bikun CRUD ( Create Read Update Delete ) pakai PHP murni 
Jika sudah punya peralatan"an nya , hehehe
Kita download dulu framework CakePHP di website resmi'nya di sini ( pojok gede kanan | ada tulisan download tuh )
sekarang saya menggunakan CakePHP versi 2.4.6 

Oke langsung aja extract CakePHP dan taruh folder'nya di dalam htdocs
lalu rename folder dengan nama : belajarcakephp
lalu coba buka belajarcakephp  di browser anda :
localhost/belajarcakephp
Nah lalu akan jadi seperti ini
Nah Error ! , tapi tenang aja ga usah khawatir , soal'nya masih belum kita setting kog :)
Oke kita fix dulu  
  • Baris "Notice (1024) pertama"
Please change the value of 'Security.salt' in APP/Config/core.php
Buka : C:\xampp\htdocs\belajarcakephp\app\Config\core.php
lalu cari : Configure::write('Security.salt', '--blablabla--');
buka link : sha1 generator Seperti ini


ganti --blablabla-- dengan sha yang sudah di checksum 
nah lalu save , dan coba di refresh :)
  • Baris "Notice (1024) kedua"
Please change the value of 'Security.cipherSeed' in APP/Config/core.php
Buka : C:\xampp\htdocs\belajarcakephp\app\Config\core.php
lalu cari : Configure::write('Security.cipherSeed', '--blablabla--');
ganti '76859309657453542496749683645' dengan numeric random (Terserah anda yang penting angka)
nah lalu save , dan coba di refresh lagi  :)
  • Baris "Your database configuration file is NOT present"
Nah kita harus mengkonfigurasi Database'nya
Pertama kita buat Database'nya dan beri nama belajarcake
lalu buka folder C:\xampp\htdocs\belajarcakephp\app\Config
nah di situ akan ada file "database.php.default" , kita rename "database.php" ( hapus .defaut)
dan buka file yang "database.php" tadi di rename
dan di ubah seperti ini :
class DATABASE_CONFIG {

	public $default = array(
		'datasource' => 'Database/Mysql',
		'persistent' => false,
		'host' => 'localhost',
		'login' => 'root',
		'password' => '',
		'database' => 'belajarcake',
		'prefix' => '',
		//'encoding' => 'utf8',
	);

	public $test = array(
		'datasource' => 'Database/Mysql',
		'persistent' => false,
		'host' => 'localeconv(oid)lhost',
		'login' => 'root',
		'password' => '',
		'database' => 'belajarcake',
		'prefix' => '',
		//'encoding' => 'utf8',
	);
}
nah setelah itu coba di buka lagi browser'nya lalu di refresh aja :)
udah jadi " Your database configuration file is present " 
Lalu next . .
  • Install Debuging "DebugKit is not installed"
 Sekarang download dulu DebugKit di sini


setelah download lalu kita extract dan rename folder debug_kit-master Menjadi DebugKit lalu kita pindahin ke C:\xampp\htdocs\belajarcakephp\app\Plugin

Nah setelah itu kita buka file bootstrap.php dan buka plugin'nya

 CakePlugin::loadAll(); // Loads all plugins at once
 CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
Seperti ini :

Next
Kita panggil komponen'nya dengan cara :
Buka C:\xampp\htdocs\belajarcakephp\app\Controller\AppController.php
Lalu kita panggil komponen di dalam class AppController seperti ini

class AppController extends Controller {
	 public $components = array( 'DebugKit.Toolbar' );
}
Seperti ini :
Terakhir buka file C:\xampp\htdocs\belajarcakephp\app\Config\core.php dan cari baris berikut:
Configure::write('debug', 2);
ubah jadi 
Configure::write('debug', 1);

Nahh akhir'nya selesaii juga hehehe ,
coba buka browser'nya lagi dan refresh deh :)
masih ada'kah yangg Error ? hayoo ? :p


Oke mungkin sekian dlu deh tutorial cake'nya lain kali bakalan update kog hehe :p
Byee . . .

CakePHP | What is CakePHP ?

What is CakePHP ?
what do you think is cake , cookie ? hehe :)

CakePHP is Framework for PHP , CakePHP is a free , open-source, rapid development framework
is fondational structur for progammer to create web application, primary goal is to you work in a structure rapid manner without of flaksibility

CakePhp take to monotony out of to web development, We provide you with all the tools you need to get started coding what you really need to get done: the logic specific to your application. Instead of reinventing the wheel every time you sit down to a new project, check out a copy of CakePHP and get started with the real guts of your application.
CakePHP has an active developer team and community, bringing great value to the project. In addition to keeping you from wheel-reinventing, using CakePHP means your application’s core is well tested and is being constantly improved.
Here’s a quick list of features you’ll enjoy when using CakePHP:
  • Active, friendly community
  • Flexible licensing
  • Compatible with versions 4 and 5 of PHP
  • Integrated CRUD for database interaction
  • Application scaffolding
  • Code generation
  • MVC architecture
  • Request dispatcher with clean, custom URLs and routes
  • Built-in validation
  • Fast and flexible templating (PHP syntax, with helpers)
  • View Helpers for AJAX, JavaScript, HTML Forms and more
  • Email, Cookie, Security, Session, and Request Handling Components
  • Flexible ACL
  • Data Sanitization
  • Flexible Caching
  • Localization
  • Works from any web site directory, with little to no Apache configuration involved
notifikasi
close