This project is a web application built with Laravel that allows users to browse, filter, edit, and manage products organized by categories.
The application demonstrates typical CRUD functionality together with filtering, pagination, and a structured dashboard interface.
The goal of the project is to showcase good Laravel practices such as:
- MVC architecture
- Blade templating
- Eloquent relationships
- Factories and seeders
- Form validation
- Reusable partial views
When opening the dashboard, the user is presented with a visual overview of all product categories.
Each category displays:
- An icon
- The category name
- Number of products in the category
Selecting a category opens the product view for that category.
Inside a category, users can see a list of products containing:
- Product name
- Description
- Color
- Category
- Price
- Stock amount
Products are paginated for better performance and usability.
Products can be filtered using the filter form:
- Search by product name
- Color
- Filter by category
- Minimum price
- Maximum price
- Stock availability
- Sorting (name, price, stock)
Filtering uses GET parameters, allowing filtered views to be bookmarked or shared.
Users can manage products through:
- Edit – update product details
- Delete – remove a product from the database
Laravel validation ensures that all submitted data is valid.
- Laravel
- PHP
- Blade templates
- Eloquent ORM
- HTML / CSS
- Factories and Seeders
- Pagination
The application uses two main models:
Stores product categories.
Fields:
idname- timestamps
Relationship:
- A category has many products
Stores product information.
Fields:
idnamedescriptioncolorpricestockcategory_id- timestamps
Relationship:
- A product belongs to a category
The project includes database seeders that populate the application with realistic demo data.
This ensures the application looks the same when run locally as it does for reviewers or clients.
Seeded data includes:
- Several predefined categories
- Multiple products with realistic names, descriptions, prices, and stock values
Clone the repository:
git clone https://github.com/saadondaniella/Nailed-It
cd Nailed-ItInstall dependencies:
composer installCreate environment file:
cp .env.example .envGenerate application key:
php artisan key:generateThe application uses MySQL as the database. After creating the .env file, update the database configuration with your local MySQL credentials.
Make sure the database section in .env looks like this:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=If the lines are commented out, remove the # so Laravel can read them. You may also need to create the database manually before running migrations.
Example using MySQL:
CREATE DATABASE laravel;
Run migrations and seed the database:
php artisan migrate:fresh --seedThis will:
- create all tables
- populate the database with demo data
Start the Laravel development server:
php artisan serveOpen the application in your browser:
http://localhost:8000
To test the application, you can log in using the following demo account:
Email: rune@yrgo.se
Password: 123
Important directories:
app/
Models/
Http/Controllers/
resources/views/
layouts/
dashboard/
partials/
database/
factories/
seeders/
- Controllers handle business logic
- Models manage database relationships
- Views are rendered using Blade templates
The application includes several security practices:
- Blade escaping (
{{ }}) prevents XSS attacks - Form validation ensures correct input
- CSRF protection is enabled for all forms
- Method spoofing is used for DELETE requests
Possible improvements for the project:
- Product image uploads
- Product search optimization
Daniella Saadon
GitHub: https://github.com/saadondaniella
Marie Färnström
GitHub: https://github.com/mariefarnstrom