spizian/wizardtube

laravel 应用程序的 Wizard 安装

安装: 9

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 0

开放问题: 0

语言:Blade

1.5 2024-02-14 06:36 UTC

This package is auto-updated.

Last update: 2024-09-14 07:46:23 UTC


README

  • php 8.2
  • 需要 Laravel 10

安装

composer require spizian/wizardtube

代码风格将由 php-cs-fixer 自动修复。

为了确保代码只能在特定域中访问,创建一个中间件类。例如 "CheckDomain"。

php artisan make:middleware CheckDomain

然后创建一个 handle 函数

public function handle(Request $request, Closure $next): Response
{
    if ($request->getHttpHost() != env('DOMAIN_SITE')) {
        return response('Create message here'); // Change respond with what you want.
    }
    return $next($request);
}

在路由中导入,并为 CheckDomain 创建一个中间件组。

use App\Http\Middleware\CheckDomain;

Route::middleware(CheckDomain::class)->group(function () {
    // Your routes here
});