vendorname/laravel-package-skeleton

dev-master 2022-10-16 02:50 UTC

This package is auto-updated.

Last update: 2024-12-16 07:39:22 UTC


README

Packages are used to add new functionality in laravel.

How to create a laravel Package?

Create Package directory

mkdir Package

Create directory structure for package

plot

Installation

In project composer.json add

 "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/",
            "VendorName\\LaravelPackageSkeleton\\": "Package/laravel-package-skeleton/src"
        }
    },

config/app.php add in to 'providers' array

VendorName\LaravelPackageSkeleton\LaravelPackageSkeletonServiceProvider::class,

Usage

// Usage description here

use facade

LaravelPackageSkeletonFacade::getFacadeAccessor();

Credits