can not run migration
-
public function up() { Schema::create('registerusers', function (Blueprint $table) { $table->increments('id'); $table->string('firstname', 10); $table->string('lastname', 20); $table->integer('phone', 10); $table->string('email')->unique(); $table->string('gender'); $table->string('vehiclemodel'); $table->string('platenum', 6); $table->timestamps(); }); }
Erroris : Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
-
othana tiyena integer eka unsigned karana
$table->integer('phone',10)->unsigned();
-
SQLSTATE[HY000]: General error: 1364 Field 'username' doesn't have a default value (SQL: insert into
registerusers
(updated_at
,created_at
) values (2019-07-15 12:03:06, 2019-07-15 12:03:06))
menna me error eka enwa, data base ekata data sav krnna giama.public function storeRegister(Request $request)
{
$registeruser = new registeruser;
$request->all();
$registeruser->save();
} -
username kyna field ekata value ekak naha kyla kyanne
-
@hashan row sql use krane ai mchan , Laravel ORM eka use karana