defaultStringLength is introduced in Laravel v5.4. Reference.
You can update the Laravel version
OR
You specify the length as $table->string('coumname', 255); You cannot specify more than 255. If you leave the length parameter it will assign 255 by default