John Howard

1645 经验值

我的是win7操作系统,homestead安装并启动成功
现在运行视频里方法,添加域名和指向,就会这样:

vagrant@homestead:~$ serve homesteade.app /home/vagrant/Code/Laravel/public
dos2unix: converting file /vagrant/scripts/serve-laravel.sh to Unix format ...

就换行了,找了很多地方,都没找到解决方法,请指教

系统是Windows 7

如题,报错的提示为:

Bringing machine 'homestead-7' up with 'virtualbox' provider...
D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/provisioners/shell/config.rb:68:in `expand_path': incompatible character encodings: UTF-8 and GBK (Encoding::CompatibilityError)
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/provisioners/shell/config.rb:68:in `expand_path'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/provisioners/shell/config.rb:68:in `validate'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/kernel_v2/config/vm.rb:751:in `block in validate'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/kernel_v2/config/vm.rb:741:in `each'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/kernel_v2/config/vm.rb:741:in `validate'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/config/v2/root.rb:68:in `block in validate'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/config/v2/root.rb:64:in `each'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/config/v2/root.rb:64:in `validate'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/config_validate.rb:15:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `block in run'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in `busy'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `run'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builtin/call.rb:53:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/warden.rb:34:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/builder.rb:116:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `block in run'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/util/busy.rb:19:in `busy'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/action/runner.rb:66:in `run'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:225:in `action_raw'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:200:in `block in action'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/environment.rb:567:in `lock'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in `call'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/machine.rb:186:in `action'
        from D:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

我用Laravel 做好一个项目之后,如何使用在线更新程序?
例如我上线的版本为V1.0,更新服务器的版本为V1.1,后台点击更新后,可以从更新服务器下载项目的更新文件
有没有此类的插件或者方法?

Markdown 语法写出来的啊,是要下面的效果吗?

点击下面的链接,老大有教

https://www.laravist.com/discuss/markdown/learn-to-use-markdown-21

Controller 我是这样写的

    $role = Role::findOrFail($id);
    $permissions = Permission::all();
    $roleperm = $role->perms->pluck('id');

blade 我是这么写的

@foreach($permissions as $permission)
    <label>
        <input type="checkbox" name="permission[]" value="{$permission->id}" { in_array($permission->id, $roleperm) ? 'checked' : ''} > {$permission->display_name}
    </label>
@endforeach

这个checked 没有生效

例如我从数据库中读取了字段array

[
1,
3
]

对应的有

<input type="checkbox" name="1">
<input type="checkbox" name="3">
<input type="checkbox" name="4">

如何给1和3设置为checked