title: Laravel - Multiple primary key
body: <p>I'm new on Laravel framework, I try too create table with 2 foreign key and I want they become primary in this table. But I have an error when I write php artisan migrate</p>
  
  <p>SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary ke<br>
    y defined (SQL: alter table <code>doc_tag</code> add primary key doc_tag_id_tag_primar<br>
    y(<code>id_tag</code>)</p>
  
  <pre><code>Schema::create('doc_tag', function(Blueprint $table)
  {
      $table-&gt;integer('id_doc')-&gt;unsigned();
      $table-&gt;primary('id_doc');
      $table-&gt;foreign('id_doc')
                  -&gt;references('id')
                  -&gt;on('doc');
      $table-&gt;integer('id_tag')-&gt;unsigned();
      $table-&gt;primary('id_tag');
      $table-&gt;foreign('id_tag')
                  -&gt;references('id')
                  -&gt;on('tag');
  });
  </code></pre>
  
  <p>I know the SQL code which is : (But I do not really know how to translate this SQL code in Laravel) </p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `Doc_project`.`document_has_Tags` (
    `document_id_document` INT NOT NULL,
    `Tags_id_Tag` INT NOT NULL,
    PRIMARY KEY (`document_id_document`, `Tags_id_Tag`),
    INDEX `fk_document_has_Tags_Tags1_idx` (`Tags_id_Tag` ASC),
    INDEX `fk_document_has_Tags_document1_idx` (`document_id_document` ASC),
    CONSTRAINT `fk_document_has_Tags_document1`
      FOREIGN KEY (`document_id_document`)
      REFERENCES `Doc_project`.`document` (`id_document`)
      ON DELETE NO ACTION
      ON UPDATE NO ACTION,
    CONSTRAINT `fk_document_has_Tags_Tags1`
      FOREIGN KEY (`Tags_id_Tag`)
      REFERENCES `Doc_project`.`Tags` (`id_Tag`)
      ON DELETE NO ACTION
      ON UPDATE NO ACTION)
  </code></pre>
  
  <p>It's an N:N relation </p>
  
  <p>Someone have an idea ? </p>