feat: Implement Document Module with Dropzone file upload functionality

- Added DocumentController for handling document uploads and management.
- Created Document model with necessary attributes and relationships.
- Implemented DocumentService for business logic related to documents.
- Set up routes for document management in both web and API contexts.
- Developed views for document upload using Dropzone for file handling.
- Included necessary assets and styles for the Document module.
- Created migration for documents table with appropriate fields.
- Added configuration and service provider for the Document module.
This commit is contained in:
2025-08-01 18:00:15 +05:45
parent 64592f5b96
commit efa9231391
39 changed files with 1831 additions and 69 deletions

View File

@@ -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.
*/
public function up(): void
{
Schema::create('documents', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('file_path');
$table->unsignedBigInteger('documentable_id');
$table->string('documentable_type');
$table->index(['documentable_type', 'documentable_id']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('documents');
}
};

View File

@@ -0,0 +1,16 @@
<?php
namespace Modules\Document\Database\Seeders;
use Illuminate\Database\Seeder;
class DocumentDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// $this->call([]);
}
}