PHPackages                             larashopping/shopping - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. larashopping/shopping

ActiveLibrary[Framework](/categories/framework)

larashopping/shopping
=====================

Basic shopping cart system in laravel packages

07PHP

Since Mar 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/zahidgani/larashopping)[ Packagist](https://packagist.org/packages/larashopping/shopping)[ RSS](/packages/larashopping-shopping/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

### Set Pemission

[](#set-pemission)

- set permission : chmod -R o+w storage bootstrap

### Setup your own Packages

[](#setup-your-own-packages)

- create folder name packages in main root
- add folder of vendor name
- add folder of project name
- add folder src in project name
- your document should be packages/laravelcms/shopping/src
- in your terminal of path shopping
- command : composer init press enter
- type package path packages/laravelcms and press enter
- in minimum-stability: dev then press enter untill exit
- in your main composer.json add
- "autoload": { "classmap": \[ "database" \], "psr-4": { "App\\": "app/", "laravelcms\\shopping\\": "packages/laravelcms/shopping/src/" } },
- compososer dump-autoload
- Add service provider in yoiur src/ShoppingServiceProvider.php

    namespace laravelcms\\shopping; use Illuminate\\Support\\ServiceProvider; class ShoppingServiceProvider extends ServiceProvider { public function boot() { include **DIR**.'/routes.php'; //For publich and copy this view in your another laravel project command:php artisan vendor:publish $this-&gt;publishes(\[ **DIR**.'/views' =&gt; base\_path('resources/views/laravelcms/shopping'), \]);

    ```
      $this->publishes([
         __DIR__ . '/migrations' => $this->app->databasePath() . '/migrations'
      ], 'migrations');

       $this->publishes([
         __DIR__ . '/seeds' => $this->app->databasePath() . '/seeds'
      ], 'seeds');

    ```

    }

    public function register() { // register our controller $this-&gt;app-&gt;make('laravelcms\\shopping\\ProductController'); $this-&gt;loadViewsFrom(**DIR**.'/views', 'add-product');
    $this-&gt;loadViewsFrom(**DIR**.'/views', 'manage-product');
    }
    }
- Add controller in yoiur src/ProductController.php

    namespace laravelcms\\shopping; use App\\Http\\Controllers\\Controller; use Illuminate\\Http\\Request; use Illuminate\\Support\\Facades\\Session; use laravelcms\\shopping\\models\\Item; error\_reporting(0); class ProductController extends Controller { public function form\_product() {

    ```
     	return view('add-product::add_product');

     }
     public function form_submitted(Request $request)
     {

     	 $product_name   = stripslashes($request->product_name);
     	 $product_amount = stripslashes($request->product_amount);
     	 $product_desc   = stripslashes($request->product_desc);
     	 $date           = date("Y-m-d h:i:s");
     	 $stm=new Item;
     	 $stm->product_name=$product_name;
     	 $stm->product_amount=$product_amount;
     	 $stm->product_desc=$product_desc;
     	 $stm->created_at=$date;
     	 $stm->updated_at=$date;
     	 $stm->save();

     	  //session()->flash('sussess', 'Successfully updated invoice price');
        return redirect("manage-product");

     }
     public function list_product()
     {
            $id=isset($_REQUEST["id"])?$_REQUEST["id"]:0;
            if($id>0)
            {
              Item::where("id",$id)->delete();
            }

     	    $row=Item::all();
     	    return view('manage-product::manage_product')->with("row",$row);

     }

    ```

    }
- Add routes in src/routes.php Route::get("test","laravelcms\\shopping\\ProductController@index"); Route::get("add-product","laravelcms\\shopping\\ProductController@form\_product"); Route::get("manage-product","laravelcms\\shopping\\ProductController@list\_product"); Route::post("add-products","laravelcms\\shopping\\ProductController@form\_submitted");
- Add views folder and add file in views it should be src/views/add\_product.blade.php src/views/manage\_product.blade.php
- again run: composer dump-autoload
- Add migration folder in src/migrations/2017\_03\_14\_000000\_create\_product\_demo\_items\_table.php use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Database\\Migrations\\Migration;

    class CreateProductDemoItemsTable extends Migration { public function up() { Schema::create('laracms\_product', function(Blueprint $t) { $t-&gt;increments('id')-&gt;unsigned(); $t-&gt;string('product\_name', 200); $t-&gt;string('product\_amount', 10); $t-&gt;string('product\_desc', 500); $t-&gt;timestamps(); }); }

    ```
      public function down()
      {
          Schema::drop('laracms_product');
      }

    ```

    }
- Add Models folder src/models/Items.php namespace laravelcms\\shopping\\models;

    use Illuminate\\Database\\Eloquent\\Model;

    class Item extends Model { protected $table = 'laracms\_product'; }
- ==============if you want to reuse your code
- run: php artisan vendor:publish
- it will be copied all your packages file in main laravel project
- run: php artisan migrate it will created product table in your database and you can use
- you can check add-product,manage-product

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25099502?v=4)[zahid-avyatech](/maintainers/zahid-avyatech)[@zahid-avyatech](https://github.com/zahid-avyatech)

---

Top Contributors

[![zahidgani](https://avatars.githubusercontent.com/u/6310947?v=4)](https://github.com/zahidgani "zahidgani (1 commits)")

### Embed Badge

![Health badge](/badges/larashopping-shopping/health.svg)

```
[![Health](https://phpackages.com/badges/larashopping-shopping/health.svg)](https://phpackages.com/packages/larashopping-shopping)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M836](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
