跟前幾年比,現(xiàn)在越來越多的開發(fā)者喜歡使用 Laravel,研究 Laravel。但 Laravel 框架的學(xué)習(xí)曲線比較陡,市面上各種各樣 Laravel 學(xué)習(xí)資料的質(zhì)量參差不齊的。
所以想整理一份較為完備的 Laravel 知識匯總表 (laravel-awesome),供 Laravel 愛好者們分享和一起維護(hù)。
我相信市面上有很多這類型的匯總,但我覺得做好這件事,需要持之以恒,不斷優(yōu)化,增加新的,刪除或者替換已經(jīng)過時的。
該 Laravel-awesome 主要分成幾個模塊來匯總:
- 核心概念
- 插件推薦
- 圖書推薦
- 工具推薦
- 教程推薦
- 最佳實踐
- 開源項目
- 社區(qū)
核心概念
主要收集目前對 Laravel 核心源代碼解析較為透徹的文章。
- 看 Lumen 源代碼解析 Request 到 Response 過程 https://mp.weixin.qq.com/s/lWuVBW4lMOeQHs7FD-fDDQ
插件推薦
插件的使用,更多是幫忙我們的開發(fā),減少代碼的復(fù)寫。但也不是插件使用越多越好,這就要求插件的質(zhì)量一定要過關(guān)。
- EasyWeChat:微信開發(fā),從未如此簡單。每一個功能設(shè)計,都經(jīng)過精心打磨,只為了提供更好的開發(fā)體驗。在國內(nèi)的 Laravel 開源插件中,這個質(zhì)量 No.1。https://www.easywechat.com/
- nikic/FastRoute: This library provides a fast implementation of a regular expression based router. Lumen 御用 Router。https://github.com/nikic/FastRoute
- barryvdh/laravel-ide-helper:估計這個是開發(fā) Laravel 項目的標(biāo)配工具了吧。https://github.com/barryvdh/laravel-ide-helper
- barryvdh/laravel-debugbar:對 Laravel 開發(fā)者而言,Barry vd. Heuvel 發(fā)布的 Laravel Debugbar 是值得擁有的調(diào)試和追溯工具。它功能強大,安裝便易??梢詫?yīng)用程序中所發(fā)生的事情一覽無余:經(jīng)過的路由和控制器,數(shù)據(jù)庫查詢和執(zhí)行時間,數(shù)據(jù)展示,異常,查看執(zhí)行內(nèi)容和執(zhí)行過程時間線等等。嘗試過使用這個包后,你將在之后的 Laravel 應(yīng)用開發(fā)中對它愛不釋手。https://github.com/barryvdh/laravel-debugbar
- briannesbitt/Carbon:時間處理器,我只認(rèn)準(zhǔn)這一家。https://github.com/briannesbitt/Carbon
- jenssegers/date 日期處理工具(讓 Carbon 支持多語言,中文用戶的福音)https://github.com/briannesbitt/Carbon
- laravel-admin:是一個可以快速幫你構(gòu)建后臺管理的工具,它提供的頁面組件和表單元素等功能,能幫助你使用很少的代碼就實現(xiàn)功能完善的后臺管理功能。美中不足的就是怎么做 test?http://laravel-admin.org/docs/#/zh/
- Guzzle:網(wǎng)絡(luò)請求,我推薦這個,好用。http://guzzle-cn.readthedocs.io/zh_CN/latest/quickstart.html
- Faker:用于生成假數(shù)據(jù)的 PHP 類庫。https://github.com/fzaninotto/Faker
- Intervention/image:Intervention Image is a PHP image handling and manipulation library providing an easier and expressive way to create, edit, and compose images. The package includes ServiceProviders and Facades for easy Laravel integration. 圖片處理插件,我推薦用這個。https://github.com/Intervention/image
- vinkla/laravel-hashids Hash:ID 生成器,主要是用于生成相同的位數(shù)的 id,很有用,并且可以隱藏真正的表 id 值。https://github.com/vinkla/laravel-hashids
- webpatser/laravel-uuid:Laravel package to generate and to validate a UUID according to the RFC 4122 standard.https://github.com/webpatser/laravel-uuid
- tightenco/collect:Import Laravel's Collections into non-Laravel packages easily, without needing to require the entire Illuminate\Support package. 剛好推薦的書《Refactoring to Collections》。https://github.com/tightenco/collect
- spatie/laravel-activitylog:很多系統(tǒng)想記錄用戶的所有活躍記錄。這個包可以很方便的記錄你的用戶何時何地的創(chuàng)建、更新實體的記錄。https://github.com/spatie/laravel-activitylog
- medz/id-card-of-china 一個基于「公民身份號碼」規(guī)則獲取身份證號碼中包含的基礎(chǔ)信息組件(PHP)
- ofcold/identity-card A simple proof of identity card of the people's Republic of China. 其實這兩個方法哪個好,哪個不好,沒具體研究,但分享這兩個的理由是:對國內(nèi)獨有的身份證驗證做開發(fā),是一件有意思的事情。
圖書推薦
市面上對 Laravel 的研究和使用類的書籍不太多,有些經(jīng)典的版本已不適用了,下面羅列的我覺得挺有價值的,推薦看看。
- 《Refactoring to Collections》Never write another loop again. https://adamwathan.me/refactoring-to-collections/
- 《Laravel Collections Unraveled》Wondering why everyone keeps tweeting about "Amazing Laravel Collections!" Tired of reading about the function you could have used? "Laravel Collections Unraveled" is for you! Updated to cover Version 5.4. https://leanpub.com/laravelcollectionsunraveled
- 《Building a Chatbot with Laravel and BotMan》 Learn how to build a chatbot from scratch using the framework you already know. 簡短的一本書,學(xué)到的東西不少。https://laravel-news.com/chatbot
工具推薦
工具的本身,就是讓我們在開發(fā)過程中,減少不必要的錯誤和問題,讓我們更加關(guān)注代碼本身。
- squizlabs/PHP_CodeSniffer:每個公司都會有一套大家遵循的代碼編寫規(guī)范標(biāo)準(zhǔn),這時候再輔于工具,那就完美了,所以推薦這個工具,幾個主流的編輯器都支持。https://github.com/squizlabs/PHP_CodeSniffer
- phubb - PHP PubSubHubbub server:自建 RSS 實時推送功能,這個工具強烈推薦。http://phubb.cweiske.de/
- Travis-CI:如果你是用 Github 作為代碼托管平臺,那使用 Travis-CI 在線持續(xù)集成服務(wù),自動化執(zhí)行單元測試,或者部署任務(wù)等。https://travis-ci.org/
- rakyll/hey:壓測工具推薦一個,網(wǎng)友說:“用 ab 的話,有個小坑,如果測試的目標(biāo) Laravel 站點帶 https,Requests per second 會永遠(yuǎn)保持在 15 左右 , 一度以為所有的優(yōu)化策略都無效。。?!?https://github.com/rakyll/hey
- PHP Coding Standards Fixer:代碼自動格式化工具,推薦試試這個工具。http://cs.sensiolabs.org/
- swooletw/laravel-swoole:使用 Swoole 來加速你的 Laravel 應(yīng)用。https://github.com/swooletw/laravel-swoole
- Laragon:推薦的 Windows Laravel 集成環(huán)境,Windows 的朋友可以試試。https://forum.laragon.org/topic/473/download-laragon
- rollbar:異常監(jiān)控系統(tǒng),快速引入項目,實時反饋異常情況,可惜就是需要 money。https://rollbar.com/
教程推薦
跟著好的教程走,可以有效的掌握 Laravel 開發(fā)語言,尤其是有價值的教程,能讓我們更加透徹的了解和使用 Laravel。
- 2017 版 Laravel 系列入門教程 關(guān)注 @johnlui 作者很久了,跟著他,學(xué)了不少東西,推薦初學(xué)者看看。
- Building a Vue SPA with Laravel Laravel + vue 這是目前「全?!沟臉?biāo)配。
最佳實踐
- alexeymezenin/laravel-best-practices. It's not a Laravel adaptation of SOLID principles, patterns etc. Here you'll find the best practices which are usually ignored in real life Laravel projects. https://github.com/alexeymezenin/laravel-best-practices
- 「翻譯版看這個」Laravel 的十八個最佳實踐。https://laravel-china.org/articles/12762/eighteen-best-practices-of-laravel
開源項目
開源項目,好比「武功秘籍」,拿到一本牛逼的武功秘籍,何愁功力不精進(jìn)~
- octobercms/october:Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework. 值得一用,而且作者來頭不小哦。http://octobercms.com/
- jcc/blog:?? 這是一個由 Laravel 5.* 和 Vuejs 2.* 建立的開源博客系統(tǒng)?!窹J Blog is an open source blog built with Laravel and Vue.js.」https://github.com/jcc/blog/
社區(qū)
社區(qū)是「物以類聚,人與群分」的場所,時常逛逛社區(qū),了解大家都在討論什么,分享什么技術(shù),讓我們不至于脫節(jié)了。
- LaravelChina:學(xué)習(xí) Laravel,不知道這個網(wǎng)站,那就沒法混了。https://laravel-china.org/
- Laravel News:The official Laravel news source. https://laravel-news.com/
- laracasts:The best PHP and Laravel screencasts on the web. 對于企業(yè),推薦買一個賬號供技術(shù)人員學(xué)習(xí)使用,確實不錯。當(dāng)然,個人買有點小貴。https://laracasts.com/
總結(jié)
這個「Laravel-awesome」剛剛起步,定期都會根據(jù)自己的實際使用和對 Laravel 技術(shù)的了解,收集真正對開發(fā)者有價值的內(nèi)容和資料,匯總在這里。
也歡迎更多的朋友們能參與進(jìn)來,一起分享,傳播 Laravel 技術(shù)!
期待您的參與
Laravel-awesome 鏈接:https://github.com/fanly/laravel-awesome