Here we will discuss laravel tinyInteger and tinyText type migration. what use of tinyInteger and tinyText migration. laravel migration tutorials.
Laravel tinyInteger migration
Laravel tinyInteger() migration create mysql TINYINT type column and it is smallest size integer (1 byte).
public function up() { Schema::create('users', function (Blueprint $table) { $table->tinyInteger('age'); }); }
Laravel tinyText migration
Laravel tinyText() migration creates MySQL TINYTEXT type column. But in some time laravel gives Method Illuminate\Database\Schema\Blueprint::tinyText does not exist error in that case you can make a string-type column with the required length.
public function up() { Schema::create('users', function (Blueprint $table) { $table->tinyText('notes'); }); }
Read Also : Laravel union of two queries