Skip to content

saadondaniella/Nailed-It

Repository files navigation

Product Dashboard – Laravel Project

Overview

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

Features

Category overview

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.


Product listing

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.


Filtering

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.


Product management

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.


Technologies Used

  • Laravel
  • PHP
  • Blade templates
  • Eloquent ORM
  • HTML / CSS
  • Factories and Seeders
  • Pagination

Database Structure

The application uses two main models:

Categories

Stores product categories.

Fields:

  • id
  • name
  • timestamps

Relationship:

  • A category has many products

Products

Stores product information.

Fields:

  • id
  • name
  • description
  • color
  • price
  • stock
  • category_id
  • timestamps

Relationship:

  • A product belongs to a category

Factories and Seeders

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

Installation

Clone the repository:

git clone https://github.com/saadondaniella/Nailed-It
cd Nailed-It

Install dependencies:

composer install

Create environment file:

cp .env.example .env

Generate application key:

php artisan key:generate

Database Setup

The 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 --seed

This will:

  • create all tables
  • populate the database with demo data

Running the Application

Start the Laravel development server:

php artisan serve

Open the application in your browser:

http://localhost:8000

Demo Login

To test the application, you can log in using the following demo account:

Email: rune@yrgo.se

Password: 123


Project Structure

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

Security Considerations

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

Future Improvements

Possible improvements for the project:

  • Product image uploads
  • Product search optimization

Authors

Daniella Saadon
GitHub: https://github.com/saadondaniella

Marie Färnström
GitHub: https://github.com/mariefarnstrom

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors