Laravel: autocomplete for $table in migration scripts -

A quick tip: if you want autocomplete (intellisense) when writing migrations in Laravel, you can add type hinting for the $table variable.

Just add Blueprint before $table in the function argument. Blueprint is the type of the $table variable. You’ll be able to see all the options and don’t have to check Laravel docs anymore.

class Payments extends Migration {
  public function up() {
    Schema::create('donor_account', function(Blueprint $table){
      $table->engine ='InnoDB';

This is how it looks in PHPStorm 8:


Rss Comments


No comments yet.

Leave a comment