The Submit package provides a simple and customizable system for managing student submissions. Designed for Laravel applications, it offers essential tools to streamline student assignment submission processes with minimal setup.
composer require al-rimi/submit
php artisan submit:install
This command performs the following tasks:
- Publishes assets, views, and configuration files.
- Installs necessary Node.js dependencies.
- Updates the
vite.config.js
file with Submit assets (submit.css
andsubmit.js
). - Builds assets using
npm run build
. - Runs database migrations.
- Seeds the database with example data.
- Submission Management: Collect, validate, and store student submissions effectively.
- Email Notifications: Rreceive notifications after each submission.
- Dynamic Table Management: Displays and updates student submissions dynamically without page reloads.
- Auto-fill: Custom JS script for client side auto fill.
- UI: vanilla CSS with simple animations and clean look..
To enable submission notifications and set a deadline, add the following variables to your .env
file:
NOTIFICATION_EMAIL= # Email address to receive submission notifications
SUBMISSION_DEADLINE= # Submission deadline in ISO 8601 format (e.g., "YYYY-MM-DDTHH:MM:SS")
The package publishes its routes to routes/submit.php
. You can customize these routes to:
- Change view paths.
- Add middleware for additional security or access control.
All customizable views are published to your project for easy modification:
- Submission Page:
resources/views/submissions.blade.php
- Email Template:
resources/views/emails/submissions_email.blade.php
dependency-free assets for styling and interactivity in vanilla CSS and JavaScript:
- CSS File:
resources/css/submit.css
- JavaScript File:
resources/js/submit.js
The package provides database migrations and a sample seeder to kickstart your setup:
- Migrations: Automatically created tables for submission data.
- Seeder:
database/Seeders/StudentsTableSeeder.php
populates the database with example records.
Vite Configuration
Vite Configuration
The package automatically adds `resources/css/submit.css` and `resources/js/submit.js` to `vite.config.js`. If this step fails, manually update your `vite.config.js` file:export default defineConfig({
input: [
'resources/css/app.css',
'resources/js/app.js',
'resources/css/submit.css',
'resources/js/submit.js'
],
// other Vite configuration
});
export default defineConfig({
input: [
'resources/css/app.css',
'resources/js/app.js',
'resources/css/submit.css',
'resources/js/submit.js'
],
// other Vite configuration
});
Build Issues
Build Issues
If you encounter build issues, ensure Node.js and npm are properly installed. Then rerun:npm install
npm run build
npm install
npm run build
php artisan submit:uninstall
composer remove al-rimi/submit
- PHP 8.0 or higher
- Laravel 10.x or 11.x
- Node.js (for Vite asset compilation)
- PHP 8.0 or higher
- Laravel 10.x or 11.x
- Node.js (for Vite asset compilation)
Have questions or facing issues? Check out the issues page.
This package is open-source and is licensed under the MIT License.