源核心框架在包装中的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感谢您的阅读和关注!