composer

是 PHP 用來管理依賴(dependency)關係的工具。你能夠在本身的項目中聲明所依賴的外部工具庫(libraries),Composer 會幫你安裝這些依賴的庫文件。

經過composer安裝的類庫都放在vendor目錄下,也可經過composer安裝tp框架,其做用是能夠方便對類庫和框架的隨時更新,同時還能夠解決依賴關係php

 安裝compsoer不作過多的贅述了...thinkphp

安裝thinkphp5

composer create-project topthink/think whatever_you_like_name  --prefer-dist

更新thinkphp5

composer update

安裝擴展

在tp中咱們缺啥?看看tp官方給提供了啥標配 助手函數,image操做,驗證碼,單元測試之類的,這哪夠啊。json

我須要更強大的包,但我不知道叫啥,該上哪找? 這裏! 進去搜就好了。 好,搜出來了微信

riverslei/payment 集成支付寶、微信支付等流行的支付接口,後續會持續跟進中
composer require riverslei/payment

執行完了,就裝上了。檢查一下你的project/composer.json文件,留神到require部分,會相似這樣composer

"require": {
        "php": ">=5.4.0",
        "topthink/framework": "~5.0.0",
        "topthink/think-captcha": "1.*",
        "topthink/think-migration": "1.*",
        "topthink/think-mongo": "1.*",
        "topthink/think-queue": "1.*",
        "topthink/think-image": "1.*"
    },

 一些字體文件 快去吧,嘻嘻框架

相關文章
相關標籤/搜索