mirror of
https://github.com/devfake/flox.git
synced 2024-11-14 22:22:39 +01:00
fix recent sort of tv shows
This commit is contained in:
parent
79241ff1f9
commit
200aca29de
@ -16,5 +16,6 @@
|
||||
'episode_tmdb_id',
|
||||
'seen',
|
||||
'season_tmdb_id',
|
||||
'created_at'
|
||||
];
|
||||
}
|
||||
|
@ -193,6 +193,7 @@
|
||||
$new->episode_number = $episode->episode_number;
|
||||
$new->name = $episode->name;
|
||||
$new->tmdb_id = $tmdbId;
|
||||
$new->created_at = time();
|
||||
$new->save();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddCreatedAtField extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('episodes', function (Blueprint $table) {
|
||||
$table->integer('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('episodes', function (Blueprint $table) {
|
||||
$table->dropColumn('created_at');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user