1. Go to this page and download the library: Download hinet/laravel-invitecode 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/ */
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use InviteCode;
class DemoController extends Controller{
public function index(){
echo InviteCode::enCode(123);
//print NDZ0kA
//echo echo InviteCode::deCode('NDZ0kA');
//print 123
}
}
php artisan vendor:publish --tag=invitecode
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.