- 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.
21 lines
812 B
PHP
21 lines
812 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Modules\Document\Http\Controllers\DocumentController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
*/
|
|
|
|
Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/'], function () {
|
|
Route::get('/documents', [DocumentController::class, 'index'])->name('documents.index');
|
|
Route::post('/documents/dropzone-upload', [DocumentController::class, 'dropzoneUpload'])->name('documents.dropzone.upload');
|
|
});
|