源核心框架在包裝中的Miduner/Miduner下發佈在作曲家上。源核心框架在GitHub Miduner框架上開放
該項目是通過PHP 7.4的類型顆粒和箭頭函數實現的static typing
composer create-project danganh97/miduner:dev-master your-project-folderMiduner Framework是一個具有表現力,優雅語法的Web應用程序框架。我們認為發展必須是一種真正的愉悅,創造性的體驗,才能真正實現。 Miduner框架試圖通過緩解大多數Web項目中使用的常見任務來消除痛苦。
Miduner框架可訪問但功能強大,提供了大型,可靠的應用程序所需的工具。簡單,優雅和創新的絕佳組合為您提供了構建任務的任何應用所需的工具。
Miduner Framework擁有任何現代Web應用程序框架的最廣泛,最全面的文檔和視頻教程庫。 Miduner框架文檔正在構建。
感謝您考慮為Miduner框架做出貢獻!
如果您發現Miduner內的安全漏洞,請從[email protected]向Dang Anh Vo發送電子郵件。所有安全漏洞將立即解決。
需要PHP版本> = 7.4.10
讓我們運行php hustle list以查看所有可用的支持命令。這是一些可用的功能。
你想做一些東西嗎?
php hustle make:command {Command name}
php hustle make:controller {Controller name}
php hustle make:model {Model name}
php hustle make:request {Request name}
php hustle make:migration --table={Table name}還是只想刷新緩存?
php hustle config:cache生成應用程序密鑰!
php hustle key:generate還是為應用程序安裝Json Web Tokens ?
php hustle jwt:install然後記住刷新緩存以註冊新的應用程序密鑰!
運行遷移?太容易了
php hustle migrate或者只是回滾。
php hustle migrate:rollback讓我們運行播種機。
php hustle db:seed直播查詢,為什麼不呢?
php hustle exec:query --query= " select * from users "您只想進行測試嗎?好的,請給出-test = true,例如:
php hustle exec:query --query= " select * from users " --test=true您不知道定義的路線清單嗎?
php hustle route:list或在json或array下查看
php hustle route:list --format=json/array當然,您可以使用像文件一樣的終端使用Miduner代碼運行實時代碼
php hustle live:code噢,什葉!我不記得所有這些!
不要擔心,我們知道,請選擇您的命令並提出爭論- help喝杯咖啡
這是示例:
php hustle serve --help
只需添加到您的crontab
* * * * * cd miduner && php hustle schedule:run >> /dev/null 2>&1
示例在AppConsoleKernel中使用
<?php
namespace App Console ;
use App Console Commands ExampleCommand ;
use Midun Console Kernel as ConsoleKernel ;
use Midun Console Scheduling Schedule ;
class Kernel extends ConsoleKernel
{
/**
* List of commands
* @var array $commands
*/
protected array $ commands = [
ExampleCommand::class
];
public function schedule ( Schedule $ schedule ): void
{
// Normal using
$ schedule -> command (ExampleCommand::class)-> daily ();
$ schedule -> command (ExampleCommand::class)-> weekly ();
$ schedule -> command (ExampleCommand::class)-> monthly ();
$ schedule -> command (ExampleCommand::class)-> yearly ();
$ schedule -> command (ExampleCommand::class)-> dailyAt ( ' 13:30 ' );
$ schedule -> command (ExampleCommand::class)-> cron ( ' * * * * * ' );
// Run with custom output log and cli
$ schedule -> command (ExampleCommand::class)
-> everyMinute ()
-> output ( storage_path ( ' logs/schedule.log ' ))
-> cli ( ' /usr/bin/php ' );
}
}cp .env.example .env
php hustle key:generate
php hustle config:cache
php hustle serve或使用IP和端口自定義運行
php hustle serve --host=192.168.1.1 --port=1997注意:您可以使用參數 - 打開在瀏覽器上打開它
現在您的應用程序以127.0.0.1:8000運行
如果您不在本地安裝PHP
好吧,明白了。
docker build ./docker
docker-compose up -d或者只有你是一個懶惰的傢伙
docker-compose up --build -d請記住要添加127.0.0.1 miduner.local到您的/etc /hosts
如果您不知道此步驟,請Google搜索設置虛擬主機。
仍然很多事情在這裡寫下來。如果您想接受這個消息,請留言
中型框架是開源的,沒有許可證。因此,這是假框架,請不要使用它,永遠不要責怪
如果您想成為貢獻者,讓我們跑步:
php hustle development:enable或者
php hustle dev:mode感謝您的閱讀和關注!