niladam / laravel-marketplaceful

Marketplaceful: Core Package

Home Page:https://marketplaceful.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marketplaceful - Self-host your marketplace software

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A web platform for quickly building online marketplaces built on Laravel.

Installation

  1. Add the marketplaceful:install command to post-autoload-dump in composer.json .
"post-autoload-dump": [
    "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
    "@php artisan package:discover --ansi",
    "@php artisan marketplaceful:install --ansi"
],
  1. Require marketplaceful/laravel-marketplaceful.
composer require marketplaceful/laravel-marketplaceful
  1. Add the InteractsAsMarketplaceUser trait to your existing User model:
namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Marketplaceful\Traits\InteractsAsMarketplaceUser;

class User extends Authenticatable {

    use InteractsAsMarketplaceUser;

}
  1. Run migrations.
php artisan migrate

Dashboard Authorization

Marketplaceful exposes a dashboard at /marketplaceful. By default, you will only be able to access this dashboard in the local environment. To use it in another environment, you need to register a gate check.

You can determine which users of your application are allowed to view the Marketplaceful dashboard by defining a gate check called viewMarketplaceful.

A common place to register this check is in a service provider:

// in a service provider

public function boot()
{
   Gate::define('viewMarketplaceful', function ($user) {
       return in_array($user->email, [
            'oliver@radiocubito.com',
        ]);
   });
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Marketplaceful: Core Package

https://marketplaceful.com

License:GNU Affero General Public License v3.0


Languages

Language:Blade 51.9%Language:PHP 47.4%Language:JavaScript 0.4%Language:CSS 0.3%