1. Go to this page and download the library: Download muhamed-didovic/shortener library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
/*
* Name of table where the links or the URLs should be stored
*/
'table' => 'links',
/*
* Url that should be used with the shortened string
*/
'url' => env('APP_URL', 'http://localhost'),
/*
* Routes used in the package
*/
'routes' => [
/*
* Route used to store url with post request
*/
'post_short_route' => 'short',
/*
* Route to get shortend url with get request
*/
'get_short_route' => 'short',
/*
* Route to get status of url provided with get request
*/
'get_stats_route' => 'stats',
/*
* Route to serve Vue instance
*/
'vue_route' => '{any?}',
]
];