PHP code example of frikishaan / autonumber-laravel
1. Go to this page and download the library: Download frikishaan/autonumber-laravel 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/ */
frikishaan / autonumber-laravel example snippets
namespace App\Models;
use Frikishaan\Autonumber\Traits\HasAutonumber;
use Illuminate\Database\Eloquent\Model;
class Invoice extends Model
{
use HasAutonumber;
protected $fillable = [
'customer', 'amount',
];
}
bash
php artisan migrate
bash
php artisan autonumber:create