zahiruddinnorzain/endsystem
最新稳定版本:v1.0.6
Composer 安装命令:
composer require zahiruddinnorzain/endsystem
包简介
Set an expiration date for the system
README 文档
README
Set an expiration date for the system.
Step 1
composer require zahiruddinnorzain/endsystem
Step 2
Run this command
php artisan make:middleware CheckSystem
put this in middleware
use DateTime;
use Zahiruddinnorzain\Endsystem\EndSystemServiceProvider;
$hari = 20;
$bulan = 3;
$tahun = 2024;
$name = "admin";
$contact = "+601111236789";
$email = "email@emailme.com";
$status_pay = false;
$today = new DateTime();
$givenDate = new DateTime("$tahun-$bulan-$hari");
// Compare the dates
if ( ($today > $givenDate) && ($status_pay == false) ) {
$endsistem = new EndSystemServiceProvider;
return $endsistem->show($hari,$bulan,$tahun,$contact,$email,$name);
}else{
return $next($request);
}
Step 3
put this in web.php route file
use App\Http\Middleware\CheckSystem;
Route::middleware([CheckSystem::class])->group(function () {
Route::get('/', function () {
return view('welcome');
});
});
Preview
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-25
