Giter Club home page Giter Club logo

app's Introduction

CakePHP Application Skeleton

Build Status License Latest Stable Version Total Downloads Latest Unstable Version

A skeleton for creating applications with CakePHP 3.x.

The framework source code can be found here: cakephp/cakephp.

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

Support me 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

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

Installation

Initial new application

  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

  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

// 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.

bin/cake bake all Posts --prefix admin

Template theme

Backend

Email

Add menu to the backend

Edit src/Template/Element/Admin/navbar_side.ctp to add more menu

Included Plugins

MinifyHtml

TinyAuth

CookieAuth

Search

Backend Template:

This skeleton use Flat Admin v2 as new bake template

You just do bake code, you're good to go.

Crontab schedule:

Open crontab crontab -e then add cronjob:

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

Demo

Login page

Lost password

Register

Maintenance mode

File Manager

Setting member

Change password

Task schedule

CRUD

Index

Add

Edit

View

Page speed improvement

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.