PHP code example of wp-kit / cleanoquent

1. Go to this page and download the library: Download wp-kit/cleanoquent 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/ */

    

wp-kit / cleanoquent example snippets


composer 

namespace Theme\Models;

use WPKit\Cleanoquent\Model\Post;

class Address extends Post {
	
    /**
	     * The post_type associated with the model.
	     *
	     * @var string
	     */
		protected $post_type = 'wc-address';
		
		/**
	     * The magic_meta attributes that are mass assignable.
	     *
	     * @var array
	     */
		protected $magic_meta = [
			'_first_name' => 'first_name',
			'_last_name' => 'last_name',
			'_company' => 'company',
			'_address_1' => 'address_1',
			'_address_2' => 'address_2',
			'_city' => 'city',
			'_state' => 'state',
			'_postcode' => 'postcode',
			'_country' => 'country',
			'_email' => 'email',
			'_phone' => 'phone'
		];
    
}