malcolmknott/redirector
Composer 安装命令:
composer require malcolmknott/redirector
包简介
301 Redirects
README 文档
README
This composer package is a simple UI for saving page redirects to your database.
Installation
Begin by pulling in the package through Composer.
composer require malcolmknott/redirector
If using Laravel 5, include the service provider within your config/app.php file.
'providers' => [ Malcolmknott\Redirector\RedirectorServiceProvider::class, ];
If you have a new project, scaffold the basic login and registration views to pull in Boostrap. Or publish the view files to use your own layout.
php artisan make:auth
Run the migration for the redirects table.
php artisan migrate
Laravel Missing Page Redirector
Pull in the Spatie Laravel Missing Page Redirector package, follow the install and setup instructions.
Update the "laravel-missing-page-redirector.php" config file with the database redirector class.
'redirector' => \Malcolmknott\Redirector\DatabaseRedirector::class,
Usage
Add a route that points to the Redirector Controller, you'll probably want to add some middleware to restrict who can edit your redirects.
Route::resource('redirects', '\Malcolmknott\Redirector\RedirectController');
Views
Publish the view files to change the format and add your own style.
php artisan vendor:publish --provider="Malcolmknott\Redirector\RedirectorServiceProvider" --tag="views"
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-10