| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | function up() |
||
|
|
|||
| 10 | { |
||
| 11 | $this->create('tweets', function ($table) { |
||
| 12 | $table->increments(); |
||
| 13 | |||
| 14 | $table |
||
| 15 | ->integer('user_id') |
||
| 16 | // ->unsigned() |
||
| 17 | ->notNull() |
||
| 18 | ->references('users', 'id') |
||
| 19 | ->onUpdate('CASCADE') |
||
| 20 | ->onDelete('CASCADE'); |
||
| 21 | |||
| 22 | $table->string('content', 240)->notNull(); |
||
| 23 | $table->timestamps(); |
||
| 24 | }); |
||
| 32 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.