laravel怎么安装验证码扩展?


找到一个教程说是要添加 "gregwar/captcha": "dev-master" 到composer.json

这段要加到composer.json的哪个位置。

composer.json


 {
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "laravel/framework": "5.0.*"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php -r \"copy('.env.example', '.env');\"",
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

laravel php

Mammoth 9 years, 7 months ago

 php


 "require": {
        "laravel/framework": "5.0.*",
        "gregwar/captcha": "dev-master"
    },
然后composer update

wyg老婆 answered 9 years, 7 months ago

Your Answer