70208d2157
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
59 lines
1.2 KiB
PHP
59 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateTicketCategoriesTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('ticket_categories', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('name');
|
|
$table->timestamps();
|
|
});
|
|
|
|
DB::table('ticket_categories')->insert(
|
|
[
|
|
'name' => 'Technical',
|
|
]
|
|
);
|
|
DB::table('ticket_categories')->insert(
|
|
[
|
|
'name' => 'Billing',
|
|
]
|
|
);
|
|
DB::table('ticket_categories')->insert(
|
|
[
|
|
'name' => 'Issue',
|
|
]
|
|
);
|
|
DB::table('ticket_categories')->insert(
|
|
[
|
|
'name' => 'Request',
|
|
]
|
|
);
|
|
DB::table('ticket_categories')->insert(
|
|
[
|
|
'name' => 'Other',
|
|
]
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('ticket_categories');
|
|
}
|
|
}
|