A Laravel-based web application for managing the Sport Education Unit of Sabaragamuwa University of Sri Lanka. The system provides a public landing page, user authentication, community posting, sports team browsing, a store section, and an admin area for managing sports-related content.
- Landing page for the Sport Education Unit.
- Image carousel with university sports visuals.
- Public statistics for students, sports, and staff/coaches.
- Latest news display on the homepage.
- Public access to sports teams and store item listings.
- User registration and login using Laravel UI authentication.
- Profile edit and update functionality.
- Community post feed.
- Create posts with text descriptions.
- Upload post media, including images and videos.
- React to posts.
- Add comments and nested replies.
- Delete owned posts and related media.
- Separate admin login guard.
- Admin dashboard.
- Manage coaches.
- Manage members/students.
- Manage sports teams.
- Manage store items with image uploads.
- Manage news posts with optional images.
- View and delete users.
- Manage community posts.
- Manage and delete comments.
- Sports teams
- Coaches
- Students/members
- Store inventory
- News
- Community posts
- Post media
- Reactions
- Nested comments
- PHP 8.2+
- Laravel 12
- Laravel UI
- Laravel session authentication
- Eloquent ORM
- MySQL
- Blade templates
- Bootstrap 5
- Sass
- Vite
- JavaScript
- Axios
- Composer
- NPM
- PHPUnit
- Laravel Pint
- Laravel Sail support
- Laravel Pail
Install the following before running the project:
- PHP 8.2 or higher
- Composer
- Node.js and NPM
- MySQL or MariaDB
- Git
Useful PHP extensions for Laravel projects:
- BCMath
- Ctype
- cURL
- DOM
- Fileinfo
- JSON
- Mbstring
- OpenSSL
- PDO
- PDO MySQL
- Tokenizer
- XML
git clone https://github.com/kAveeShA161/Sport_Management_System_WebProject.git
cd Sport_Management_System_WebProjectInstall PHP dependencies:
composer installInstall JavaScript dependencies:
npm installCreate the environment file:
cp .env.example .envOn Windows PowerShell, use:
Copy-Item .env.example .envGenerate the Laravel application key:
php artisan key:generateCreate a MySQL database for the project. The default .env.example uses:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sampleapp
DB_USERNAME=root
DB_PASSWORD=Update these values in .env to match your local database.
Run migrations:
php artisan migrateOptionally run the database seeder:
php artisan db:seedThe current seeder creates a test user record. It does not create an admin account by default.
Because the admin area uses the admins table and admin guard, create an admin account manually after running migrations:
php artisan tinkerThen run:
App\Models\Admin::create([
'name' => 'Admin',
'email' => 'admin@example.com',
'password' => 'password',
]);The Admin model hashes the password automatically.
The application stores uploaded post media, store item images, and news images on the public storage disk. Create the public storage link:
php artisan storage:linkUploaded files will be served from:
public/storage
Start the Laravel development server:
php artisan serveStart the Vite development server in another terminal:
npm run devOpen the application:
http://127.0.0.1:8000
You can also run the combined Laravel development command defined in composer.json:
composer run devThis starts:
- Laravel server
- Queue listener
- Vite development server
For production assets:
npm run buildRun the Laravel test suite:
php artisan testOr use the Composer script:
composer test| Route | Description |
|---|---|
/ |
Public landing page |
/register |
User registration |
/login |
User login |
/home |
Authenticated user home |
/profile/edit |
Edit user profile |
/community |
Community post feed |
/posts |
Post listing |
/sports |
Sports teams page |
/store |
Store items page |
/admin/login |
Admin login |
/admin/dashboard |
Admin dashboard |
/admin/coaches |
Manage coaches |
/admin/members |
Manage members/students |
/admin/teams |
Manage sports teams |
/admin/store_items |
Manage store items |
/admin/news |
Manage news |
/admin/users |
Manage users |
/admin/posts/manage |
Manage community posts |
/admin/comments |
Manage comments |
app/
Http/Controllers/ Application and admin controllers
Models/ Eloquent models
bootstrap/ Laravel bootstrap files
config/ Laravel configuration
database/
migrations/ Database schema files
seeders/ Database seeders
public/
images/ Public image assets
resources/
views/ Blade templates
css/ CSS entry files
js/ JavaScript entry files
sass/ Sass styles
routes/
web.php Web routes
storage/ Logs, cache, uploaded files
tests/ PHPUnit tests
- The default database connection is MySQL.
- The default session driver is
database, so migrations must be run before using sessions. - Queue connection is configured as
databasein.env.example. - Mail is configured with the
logmailer by default. - Uploaded media requires
php artisan storage:link.
If the app key is missing:
php artisan key:generateIf pages fail because database tables are missing:
php artisan migrateIf uploaded images or videos do not appear:
php artisan storage:linkIf frontend styles or scripts are missing during development:
npm run devIf dependencies are missing:
composer install
npm installWatch Demo - University Sports Management System
This project is based on the Laravel framework, which is open-sourced software licensed under the MIT license.