https://github.com/devfaysal/laravel-domain-redirect
Redirect laravel routes to another domain
https://github.com/devfaysal/laravel-domain-redirect
Last synced: 10 months ago
JSON representation
Redirect laravel routes to another domain
- Host: GitHub
- URL: https://github.com/devfaysal/laravel-domain-redirect
- Owner: devfaysal
- License: mit
- Created: 2019-04-04T05:17:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-04T07:20:38.000Z (about 7 years ago)
- Last Synced: 2025-03-09T02:53:19.619Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Redirect Routes to another domain
[](https://packagist.org/packages/devfaysal/laravel-domain-redirect)
[](https://travis-ci.org/devfaysal/laravel-domain-redirect)
[](https://scrutinizer-ci.com/g/devfaysal/laravel-domain-redirect)
[](https://github.styleci.io/repos/179426466)
[](https://packagist.org/packages/devfaysal/laravel-domain-redirect)
Redirect laravel routes to another domain using middleware.
Example: http://example.com/some-route will redirect to http://anothersite.com/some-route
## Installation
You can install the package via composer:
```bash
composer require devfaysal/laravel-domain-redirect
```
## Usage
Publish Config file to set domain
``` php
php artisan vendor:publish --tag=domainRedirect
```
add ```domainRedirect``` middleware to the routes that you want to redirect to the domain you just set in the config file
### Testing
``` bash
composer test
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email hello@faysal.me instead of using the issue tracker.
## Credits
- [Faysal Ahamed](https://github.com/devfaysal)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).