PHP code example of gorankrgovic / laravel-shortable
1. Go to this page and download the library: Download gorankrgovic/laravel-shortable 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/ */
gorankrgovic / laravel-shortable example snippets
use Gorankrgovic\LaravelShortable\Shortable;
class Video extends Model
{
use Shortable;
/**
* Return the shortable configuration array for this model.
*
* @return array
*/
public function shortable()
{
return [
'short_url'
];
}
}