jeudi 8 décembre 2016

Laravel 5.2 - How to set random id for Eloquent table

I have a test table :

    public function up()
{
    Schema::create('besttts', function (Blueprint $table) {
        $table->string('id')->primary()->index();
        $table->string('tests')->nullable();
        $table->timestamps();
    });
}

How i can make the 'id' not to be increment and autofilled?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire