A web platform for quickly building online marketplaces built on Laravel.
- Add the
marketplaceful:install
command topost-autoload-dump
incomposer.json
.
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan marketplaceful:install --ansi"
],
- Require
marketplaceful/laravel-marketplaceful
.
composer require marketplaceful/laravel-marketplaceful
- 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;
}
- Run migrations.
php artisan migrate
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',
]);
});
}
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.