1 Star 0 Fork 0

Seiven/phalcon-devtools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Latest Version Software License Total Downloads Daily Downloads

Phalcon Devtools

What's we modify?

  • Window phalcon.bat PTOOLSPATH bug
  • Create Project add moduleDir
  • Create Controller add option --module=s , create Controller with --module=s
    • eg. phalcon.bat controller --name=Users --module=Admin
  • Create Model add option --module=s , create Model with --module=s
    • eg. phalcon.bat model --name=User --module=Admin

What's Phalcon?

Phalcon PHP is a web framework delivered as a C extension providing high performance and lower resource consumption.

What are Devtools?

This tools provide you useful scripts to generate code helping to develop faster and easy applications that use with Phalcon framework.

Requirements

  • PHP >= 5.3.9
  • Phalcon >= 2.0.0

Installing via Composer

Install composer in a common location or in your project:

curl -s http://getcomposer.org/installer | php

Create the composer.json file as follows:

{
    "require": {
        "phalcon/devtools": "dev-master"
    }
}

If you are still using Phalcon 1.3.x, create a composer.json with the following instead:

{
    "require": {
        "phalcon/devtools": "1.3.*@dev"
    }
}

Run the composer installer:

php composer.phar install

Build .phar

Install composer and box in a common location or in your project:

curl -s http://getcomposer.org/installer | php
bin/composer install

Build phar file phalcon-devtools

bin/box build -v
chmod +xr ./phalcon.phar
# Test it!
php ./phalcon.phar

Installation via Git

Phalcon Devtools can be installed by using Git.

Just clone the repo and checkout the current branch:

cd ~
git clone https://github.com/phalcon/phalcon-devtools.git
cd phalcon-devtools

This method requires a little bit more of setup. Probably the best way would be to symlink the phalcon.php to a directory in your PATH, so you can issue phalcon commands in each directory where a phalcon project resides.

ln -s ~/phalcon-devtools/phalcon.php /usr/bin/phalcon
chmod ugo+x /usr/bin/phalcon

Usage

To get a list of available commands just execute following:

$ phalcon commands help

This command should display something similar to:

$ phalcon list ?

Phalcon DevTools (2.0.9)

Help:
  Lists the commands available in Phalcon devtools

Available commands:
  commands         (alias of: list, enumerate)
  controller       (alias of: create-controller)
  module           (alias of: create-module)
  model            (alias of: create-model)
  all-models       (alias of: create-all-models)
  project          (alias of: create-project)
  scaffold         (alias of: create-scaffold)
  migration        (alias of: create-migration)
  webtools         (alias of: create-webtools)

Update WebTools from old version

Please remove manually directories:

  • public/css/bootstrap
  • public/css/codemirror
  • public/js/bootstrap
  • public/img/bootstrap
  • public/js/codemirror
  • public/js/jquery

and files:

  • public/webtools.config.php
  • public/webtools.php

and just run form your project root:

$ phalcon webtools --action=enable

Database adapter

Should add 'adapter' parameter in your db config file (if you use not Mysql database). For PostgreSql will be

$config = [
  "host"     => "localhost",
  "dbname"   => "my_db_name",
  "username" => "my_db_user",
  "password" => "my_db_user_password",
  "adapter"  => "Postgresql"
];

License

Phalcon Developer Tools is open source software licensed under the New BSD License. © Phalcon Framework Team and contributors

空文件

简介

改造的官方devtools 展开 收起
PHP
取消

发行版

暂无发行版

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/seiven/phalcon-devtools.git
git@gitee.com:seiven/phalcon-devtools.git
seiven
phalcon-devtools
phalcon-devtools
master

搜索帮助