Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-litvin/redirectmap
https://github.com/s-litvin/redirectmap
laravel laravel5 redirectmap redirects
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/s-litvin/redirectmap
- Owner: s-litvin
- Created: 2016-12-01T15:14:14.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-11T09:01:39.000Z (over 6 years ago)
- Last Synced: 2024-04-17T19:08:01.941Z (7 months ago)
- Topics: laravel, laravel5, redirectmap, redirects
- Language: PHP
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Redirect map for Laravel
Package based on decorating exceptions for HttpNotFound. It will redirect to url if it checked in table "redirect_map".
### Installation
Redirectmap requires Laravel 5.0.Install this package through Composer:
```sh
$ composer require litvin/redirectmap
```
OR manually edit your project's composer.json file to require **litvin/redirectmap**.
```php
"require": {
"litvin/redirectmap": "0.*"
}
````
```sh
$ composer update
```Open `config/app.php` and add a new item to the providers array.
```php
'providers' => [
...
Litvin\Redirectmap\ServiceProvider::class,
]
```Publish components. It will be add `config\builder\tb-definitions\redirect_map.php` and migrations.
```sh
$ php artisan vendor:publish --provider="Litvin\Redirectmap\ServiceProvider" --tag="redirect_map"
```
Apply migrations
```sh
$ php artisan migrate
```After that, you need to configurate `\config\builder\admin.php` redirects in admin panel by adding:
```php
'menu' => array(
...
array(
'title' => 'Переадресация',
'link' => '/redirect_map',
'check' => function() {return true;}
)
...
)
```Verify the deployment by navigating to admin panel and adding redirects.