master
cody 1 week ago
parent 50f17785e4
commit fde517f253

@ -145,7 +145,9 @@ class OtherController extends CommonController
->where('start_time', 'like', '%' . date('Y-m') . '%')
->get();
// 课程统计
$courseTypes = CourseType::where('is_chart', 1)->where('is_history', 0)->get();
$courseTypes = CourseType::where('is_chart', 1)
->orderBy('sort', 'asc')
->where('is_history', 0)->get();
// 默认开始时间
$start_date = CourseType::START_DATE;
// 默认结束日期一年以后

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('course_types', function (Blueprint $table) {
$table->integer('sort')->default(1)->comment('排序');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('course_types', function (Blueprint $table) {
$table->dropColumn('sort');
});
}
};
Loading…
Cancel
Save