Route downloads through controller; file IDs as hash to prevent guessing; download count; download list on airport page

This commit is contained in:
Nabeel Shahzad
2018-04-02 12:55:37 -05:00
parent 3ddee56359
commit 9e1e0142e9
8 changed files with 131 additions and 11 deletions

View File

@@ -13,15 +13,19 @@ class CreateFilesTable extends Migration
public function up()
{
Schema::create('files', function (Blueprint $table) {
$table->increments('id');
$table->string('id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('name');
$table->string('description')->nullable();
$table->string('disk')->nullable();
$table->string('path');
$table->boolean('public')->default(true);
$table->unsignedInteger('download_count')->default(0);
$table->string('ref_model', 50)->nullable();
$table->string('ref_model_id', 36)->nullable();
$table->timestamps();
$table->primary('id');
$table->index(['ref_model', 'ref_model_id']);
});
}