1. Go to this page and download the library: Download emeka/candy library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$user = new User;
$user->email = "[email protected]";
$user->username = "john";
$user->password = "password";
//without the ID property the Save method will insert a new record in to the database
$user::save();
$user = new User;
$user->id = 1;
$user->email = "[email protected]";
$user->username = "new_john";
$user->password = "new_password";
//with the ID property the Save method will update the USERS table where ID = 1.
$user::save();
$user = User::destroy($id):
$user returns a boolean
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.