dannymcc/laravel-redirection

1.0.0 2017-06-06 20:05 UTC

This package is not auto-updated.

Last update: 2024-09-29 03:36:26 UTC


README

一个用于通过数据库处理重定向的包。

安装

您可以通过composer安装此包

composer require dannymcc/laravel-redirection

接下来,将服务提供者添加到config/app.php

// config/app.php
'providers' => [
    ...
    Dannymcc\Redirection\RedirectionServiceProvider::class,
];

可选,发布配置文件

php artisan vendor:publish --provider="Dannymcc\LaravelRedirection\RedirectionServiceProvider"

用法

Redirect::create([
    'from_url'      => '/from-here',
    'to_url'        => '/to-here,
    'status_code'   => 302
]);

许可证

MIT许可证(MIT)。请参阅许可证文件以获取更多信息。