weirongxu/laravel-query-route is a Laravel package for laravel5 routing into url query.
It currently has 4 GitHub stars and 19 downloads on Packagist (latest version v1.2.0).
Install it with composer require weirongxu/laravel-query-route.
Discover more Laravel packages by weirongxu
or browse all Laravel packages to compare alternatives.
Last updated
Change laravel5 routing into query
Its useful when you can not use .htaccess
Some url transform examples
http://localhost:8000/path to http://localhost:8080/?_=/pathhttp://localhost/path/to/?a=1&b=2 to http://localhost/?a=1&b=2&_=/path/to/Install with composer
composer require weirongxu/laravel-query-route
config/app.php<?php
Weirongxu\LaravelQueryRoute\ServiceProvider::class,
// Note: The `App\Providers\RouteServiceProvider::class` must before this provider
Weirongxu\LaravelQueryRoute\Request replace laravel request in public/index.php<?php
$response = $kernel->handle(
// $request = Illuminate\Http\Request::capture()
$request = Weirongxu\LaravelQueryRoute\Request::capture()
);
php artisan vendor:publish --provider="Weirongxu\\LaravelQueryRoute\\ServiceProvider" --tag config
the underscore path indicator "_" can be customized in config/query-route.php. Set query_name to "rpath" for example:
http://localhost/path/to/?a=1&b=2 to http://localhost/?a=1&b=2&rpath=/path/to/