Cygnite - A Modern Toolkit For Web Developers

The Elegant Way of Building Full-Featured Web Applications

Cygnite Dynamic Routing

Console Overview

Documentation

Craft Console


Introduction

Craft console built on top of popular Symfony console component. It provides you helpful commands to make your development faster.

Code Generation

Code Generation - Crud Generation



  php craft generate:crud controller table_name database //plain php layout, views

  php craft generate:crud controller table_name database --template// twig templates  

  or

  php craft generate:crud controller table_name // Default database connection

  php craft generate:crud controller table_name --template // twig templates for view page


Database Migration and Seeding

Database Migration



 php craft migrate:init table_name
 
 php craft migrate up

 php craft migrate down


Form Generator



 php craft form:create table_name database
  or 
 php craft form:create table_name // Default database connection


Generating Basic Controller

Below command will generate basic ProductController into your controllers folder.



 php craft controller:create product


Generating Resource Controller

Below command will generate resource ProductController into your controllers folder.



 php craft controller:create product --resource


Generating Models

Below command will generate model class called ProductCategory into your models directory.



 php craft model:create product_category directory


Above command "product_category" represent table name and "directory" represent as database.

If you want to generate model against your default database connection then we can also make above shorter.



 php craft model:create product_category


Above features are driven by Cygnite CLI tool to make your job very easy.

Follow Us On Facebook Twitter Google+ Linkedin
Released Under The MIT Public License. Copyrights @2012-2017. Powered by- Sanjoy Dey Productions.