mirror of
https://github.com/supanadit/short-url.git
synced 2024-11-10 01:52:20 +00:00
22 lines
729 B
PHP
22 lines
729 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Support\Facades\Route;
|
||
|
|
||
|
/*
|
||
|
|--------------------------------------------------------------------------
|
||
|
| Web Routes
|
||
|
|--------------------------------------------------------------------------
|
||
|
|
|
||
|
| Here is where you can register web routes for your application. These
|
||
|
| routes are loaded by the RouteServiceProvider within a group which
|
||
|
| contains the "web" middleware group. Now create something great!
|
||
|
|
|
||
|
*/
|
||
|
|
||
|
Route::get('/', function () {
|
||
|
return view('home');
|
||
|
});
|
||
|
Route::post('/s/g', "UrlShortenerController@createShortURL");
|
||
|
Route::get('/s/{pathGenerated}', "UrlShortenerController@openDestination");
|
||
|
Route::post('/s/{pathGenerated}/open/protection', "UrlShortenerController@openProtectedDestination");
|