
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).
37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class Version1079table extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
$current_version1 = \Config::get('app.version');
|
|
$current_version2 = explode(' ', $current_version1);
|
|
$current_version = $current_version2[1];
|
|
$settings_system = DB::table('settings_system')->where('id', '=', '1')->first();
|
|
if ($settings_system != null) {
|
|
DB::table('settings_system')->insert(['version' => $current_version]);
|
|
DB::table('common_settings')
|
|
->insert(
|
|
['option_name' => 'enable_rtl', 'option_value' => ''],
|
|
['option_name' => 'user_set_ticket_status', 'status' => 1],
|
|
['option_name' => 'send_otp', 'status' => 0],
|
|
['option_name' => 'email_mandatory', 'status' => 1]
|
|
);
|
|
}
|
|
|
|
if (Schema::hasTable('common_settings')) {
|
|
$settings = DB::table('common_settings')->where('option_name', 'itil')->first();
|
|
if (! $settings) {
|
|
DB::table('common_settings')->insert(['option_name' => 'itil', 'status' => '0']);
|
|
}
|
|
}
|
|
}
|
|
}
|