| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function up() |
||
| 13 | { |
||
| 14 | $this->createTable('notification', [ |
||
| 15 | 'id' => $this->primaryKey(), |
||
| 16 | 'level' => $this->string(), |
||
| 17 | 'notifiable_type' => $this->string(), |
||
| 18 | 'notifiable_id' => $this->integer()->unsigned(), |
||
| 19 | 'subject' => $this->string(), |
||
| 20 | 'body' => $this->text(), |
||
| 21 | 'read_at' => $this->timestamp()->null(), |
||
| 22 | 'created_at' => $this->timestamp()->defaultExpression('CURRENT_TIMESTAMP'), |
||
| 23 | 'updated_at' => $this->timestamp()->null(), |
||
| 24 | ]); |
||
| 25 | $this->createIndex('notifiable', 'notification', ['notifiable_type', 'notifiable_id']); |
||
| 26 | } |
||
| 34 | } |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider.