2017 © Pedro Peláez
 

cakephp-plugin cakephp-plugin-unix-timestamp

UnixTimestamp behavior

image

oppara/cakephp-plugin-unix-timestamp

UnixTimestamp behavior

  • Friday, June 1, 2018
  • by oppara
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

UnixTimestamp plugin for CakePHP

Build Status codecov, (*1)

You can use this UnixTimestampBehavior insted of CakePHP's TimestampBehavior when want to save the unix timestamp, (*2)

Installation

You can install this plugin into your CakePHP application using composer., (*3)

The recommended way to install composer packages is:, (*4)

composer require oppara/cakephp-plugin-unix-timestamp

Enable plugin

You need to enable the plugin your config/bootstrap.php file:, (*5)

<?php
Plugin::load('Oppara/UnixTimestamp');

If you are already using Plugin::loadAll();, then this is not necessary., (*6)

Usage

more info https://book.cakephp.org/3.0/en/orm/behaviors/timestamp.html, (*7)

CREATE TABLE users (
    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(255) NOT NULL,
    password VARCHAR(255) NOT NULL,
    created INT,
    modified INT
);
<?php
namespace App\Model\Table;

use Cake\ORM\Table;

class UsersTable extends Table
{
    public function initialize(array $config)
    {
        $this->addBehavior('Oppara/UnixTimestamp.UnixTimestamp');
    }
}

The Versions

01/06 2018

dev-master

9999999-dev https://github.com/oppara/cakephp-plugin-unix-timestamp

UnixTimestamp behavior

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar oppara

cakephp behavior timestamp unix

12/03 2018

0.1.0

0.1.0.0 https://github.com/oppara/cakephp-plugin-unix-timestamp

UnixTimestamp behavior

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar oppara

cakephp behavior timestamp unix