freshwork / console
Freshwork console 工具,用于您的 Laravel 开发工作流程
0.1.2
2015-02-14 20:14 UTC
Requires
- php: >=5.3.0
- laravel/homestead: ~2.0
- symfony/console: ~2.0
- symfony/process: ~2.6
This package is not auto-updated.
Last update: 2024-09-14 16:39:50 UTC
README
您是否使用 Laravel 与 Homestead?这个包是为您准备的
安装
在您使用此包之前,需要安装 homestead 2.0。
composer global require "laravel/homestead=~2.0"
现在您可以安装 freshwork/console
composer global require freshwork/console
使用方法
配置
freshwork init # Create your configuration file #And then... freshwork edit # Opens your configuration file so you can edit it.
配置文件
{ "projects_folder":"~/code", #Local projects folder "ssh_connection_cmd":"ssh vagrant@127.0.0.1 -p 2222", # SSH command to connect to homestead "homestead_code_directory":"/home/vagrant/code",# Homestead projects folder "homestead_ip":"192.168.10.10", # Ip of homestead VM "hosts_file":"/private/etc/hosts" }
#Run this to check available commands freshwork #or freshwork list
新建项目
您可以为 Laravel 安装一个新项目。
freshwork project:new client_name.project_name
freshwork project:new client_name/project_name
默认行为
从名称 'client_name.project_name',我们默认从您的项目设置配置(您可以通过命令选项编辑它们)。
这会将您的项目文件夹安装到
- your/projects/folder/client_name/project_name
- Nginx 站点文件夹:your/projects/folder/client_name/project_name/public
将您的开发域名设置为
- project_name.app # 这样您就可以通过 http://project_name.app 在本地机器上访问您的项目。
然后,它将在创建的目录中安装 Laravel。
# This will set your project domain as other_domain.local instead of project_name.app freshwork project:new client_name.project_name -d 'other_domain.local'
运行此命令以检查可用选项
freshwork project:new -h
运行项目
# Just the same as project:new, but doesn't create the directory nor install Laravel
freshwork project:new client_name.project_name