2017 © Pedro Peláez
 

project app

CakePHP skeleton app

image

crabstudio/app

CakePHP skeleton app

  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 258 Forks
  • 1 Open issues
  • 34 Versions
  • 4 % Grown

The README.md

CakePHP Application Skeleton

Build Status License Latest Stable Version Total Downloads Latest Unstable Version, (*1)

A skeleton for creating applications with CakePHP 3.x., (*2)

The framework source code can be found here: cakephp/cakephp., (*3)

Features

  1. Authenticate, Authorize
  2. Backend ready
  3. Simple shells => Power tool
  4. New CRUD bake template
  5. Send bulk email
  6. Backup database job
  7. Store Settings in database
  8. Improve pages peed: .htaccess, minify html, cdn, cache
  9. Integrated file manager, tinymce
  10. Prevent brute force attack
  11. Remember/Auto login
  12. Compress whole project to deploy.tar.gz file to ship in one click (deploy/compress.sh)
  13. Provide VERY SIMPLE script to set up nginx (script link)

Support my passion paypal

Create project

  1. Download Composer or update composer self-update.
  2. Run php composer.phar create-project --prefer-dist crabstudio/app [app_name].

If Composer is installed globally, run, (*4)

composer create-project --prefer-dist crabstudio/app [app_name]

Installation

Initial new application, (*5)

  1. Setup Datasource in config/app.php
  2. Run and follow the command: bin/cake install
  3. Application ready to use.

Refactory

Incase you want to wipe and reinstall application, (*6)

  1. Run and follow the command: bin/cake refactory
  2. Application ready to use.

Available shell commands

    bin/cake install            : install default database
    bin/cake refactory          : wipe existing database then install factory database
    bin/cake users              : insert administrator
    bin/cake roles              : insert 3 default roles [admin, manager, member]
    bin/cake settings           : insert default settings
    bin/cake scheduler          : run task, let's create crontab schedule [scroll down to Crontab schedule]

EmailQueue

If you want to build an url point to your Controller, build it in the controller and set to the view, (*7)

// Router

$routes->connect('/verify/:token/:email', [
    'controller' => 'Coupons',
    'action' => 'verify'
], [
    'token' => '[a-z0-9]+',
    'email' => '^[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+([A-Za-z0-9]{2,4}|museum)$',
    'pass' => [
        'token',
        'email'
    ]
]);

// Build url

use Cake\ORM\TableRegistry;
use Cake\Routing\Router;

TableRegistry::get('EmailQueue')
    ->enqueue(
        $emailAddress,
        [
            'user' => 'Anh Tuan',
            'variable_url' => Router::url([
                'controller' => 'Coupons',
                'action' => 'verify',
                $tokenString,
                $emailAddress,
                '_full' => true
            ])
        ], [
            'subject' => __('Issue the coupon'),
            'template' => 'Coupon/issue',
            'format' => 'html',
            'layout' => 'default'
        ]);


// Email view (src/Template/Email/html/Coupon/issue.ctp)

= __('Hi {0},', $user)?>
= $this->Html->link(__('Verify'), $url)?>

Bake

You can use bake to generate CRUD code, then you're ready to use., (*8)

bin/cake bake all Posts --prefix admin

Template theme

Backend, (*9)

Email, (*10)

Add menu to the backend

Edit src/Template/Element/Admin/navbar_side.ctp to add more menu, (*11)

Included Plugins

MinifyHtml, (*12)

TinyAuth, (*13)

CookieAuth, (*14)

Search, (*15)

Backend Template:

This skeleton use Flat Admin v2 as new bake template, (*16)

You just do bake code, you're good to go., (*17)

Crontab schedule:

Open crontab crontab -e then add cronjob:, (*18)

*/5 * * * * cd /path/to/app && bin/cake Scheduler

Compress project to ship

Go to deploy folder then double click on compress.sh, (*19)

Set up nginx Web server

I recommend you to use nginx server., (*20)

Use this simple script to set up optimized nginx on ubuntu in 4 simple steps., (*21)

test, (*22)

Demo

Login page, (*23)

Lost password, (*24)

Register, (*25)

Maintenance mode, (*26)

File Manager, (*27)

Setting member, (*28)

Change password, (*29)

Task schedule, (*30)

CRUD

Index, (*31)

Add, (*32)

Edit, (*33)

View, (*34)

The Versions

07/01 2016
07/06 2015
08/05 2015

dev-revert-244-jsonview-serialization

dev-revert-244-jsonview-serialization http://cakephp.org

CakePHP skeleton app

  Sources   Download

MIT

The Requires

 

The Development Requires

14/11 2014

3.0.0-beta3

3.0.0.0-beta3 http://cakephp.org

CakePHP skeleton app

  Sources   Download

MIT

The Requires

 

The Development Requires

25/09 2014

3.0.0-beta2

3.0.0.0-beta2 http://cakephp.org

CakePHP skeleton app

  Sources   Download

MIT

The Requires

 

The Development Requires

20/08 2014

3.0.0-beta1

3.0.0.0-beta1 http://cakephp.org

CakePHP skeleton app

  Sources   Download

MIT

The Requires

 

The Development Requires

27/07 2014

3.0.0-alpha2

3.0.0.0-alpha2 http://cakephp.org

CakePHP skeleton app

  Sources   Download

MIT

The Requires

 

The Development Requires

24/06 2014

3.0.0-alpha1

3.0.0.0-alpha1 http://cakephp.org

CakePHP skeleton app

  Sources   Download

MIT

The Requires

 

The Development Requires