Giter Club home page Giter Club logo

najmul-hasan-sobuj / mini-ecommerce Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 92.76 MB

Mini E-commerce project encompasses user management, category, brand, product handling, reviews, orders, payment integration, notifications, and customer support.

Home Page: https://najmul-hasan-sobuj.github.io/mini-ecommerce/

License: MIT License

PHP 5.53% CSS 18.51% JavaScript 40.18% HTML 0.27% SCSS 26.40% Blade 7.86% Less 1.24%
authentication backenddevelopment customersupport databaseschema datamigration ecommerce laravel onlineshopping paymentintegration php

mini-ecommerce's Introduction

আসসালামু আলাইকুম, I'm Md: Najmul Hasan !

I'm a Software and Web Developer from Bangladesh ❤

I am an enthusiastic full-stack web developer who loves turning ideas into reality. I have a keen interest in new technologies and enjoy tackling complex problems, particularly those related to scalability and performance optimization.

age focus living followers

Github Image

  • 🌱 I’m currently learning Laravel and React js
  • 👯 I’m looking to collaborate on Laravel projects and Basic Web Dev stuff
  • 📀 Never let your brain stop, always keep it running

👨‍💻 Languages and Tools


Github Stats Streak
Github Stats Streak
Top Languages Trophy
Top Languages Trophy
LinkedIn YouTube Facebook Portfolio
Top Contributed Repo Random Dev Meme
Top Contributed Repo

mini-ecommerce's People

Contributors

najmul-hasan-sobuj avatar shahed141123 avatar

Watchers

 avatar

mini-ecommerce's Issues

More efficient and improved method for storing and updating HTML code in a form.

Here's an example of how you might structure a Blade component for a category dropdown that can be used for both storing and updating categories:

resources/views/components/category-dropdown.blade.php

@props(['categories', 'selectedId' => null])

<select class="form-select form-select-solid" name="parent_id"
        data-control="select2" data-placeholder="Select an option"
        data-allow-clear="true">
    <option></option>
    @foreach ($categories as $category)
        <option value="{{ $category->id }}" @selected($category->id == $selectedId)>
            {{ str_repeat('-', $category->depth) }} {{ $category->name }}
        </option>
    @endforeach
</select>

This component can be included in both create and edit forms like this:

{{-- Create Form --}}
<x-category-dropdown :categories="$topLevelCategories" />

{{-- Edit Form --}}
<x-category-dropdown :categories="$topLevelCategories" :selectedId="$currentCategory->parent_id" />

In your controller methods, you might have something like:

public function create()
{
    $topLevelCategories = Category::whereNull('parent_id')->get();
    return view('categories.create', compact('topLevelCategories'));
}

public function edit(Category $category)
{
    $topLevelCategories = Category::whereNull('parent_id')
                                  ->where('id', '!=', $category->id)
                                  ->get();
    return view('categories.edit', compact('category', 'topLevelCategories'));
}

Here is a basic example of what the class might look like:

// app/View/Components/CategoryDropdown.php

namespace App\View\Components;

use Illuminate\View\Component;
use App\Models\Category;

class CategoryDropdown extends Component
{
    public $categories;
    public $selectedId;

    /**
     * Create a new component instance.
     *
     * @param Collection $categories
     * @param int|null $selectedId
     */
    public function __construct($categories, $selectedId = null)
    {
        $this->categories = $categories;
        $this->selectedId = $selectedId;
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\View\View|string
     */
    public function render()
    {
        return view('components.category-dropdown');
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.