PHP code example of cedaesca / urlshortener

1. Go to this page and download the library: Download cedaesca/urlshortener 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/ */

    

cedaesca / urlshortener example snippets


use cedaesca\URLShortener\Facades\URLShortener;

URLShortener::create($request);

Route::get('/r/{code}', 'UrlShortenerController@redirect')->name('rthis');

return redirect(URLShortener::target($request));

return redirect(URLShortener::log($request)->target());
`
php artisan vendor:publish
`
php artisan migrate