Getting Started
Installation
First, you'll need to purchase a License to use RapidSaaS CONDUIT
in your project.
You can purchase a license from here.
Once you have purchased a license, you will need to authenticate: you can install the package via composer:
1composer config --auth http-basic.mergeloop-conduit.repo.repman.io token [YOUR_LICENSE_KEY]
Next, add the following to your composer.json
file's repositories section:
1{2 "repositories": [3 {"type": "composer", "url": "https://mergeloop-conduit.repo.repman.io"} 4 ]5}
Finally, you can install the package via composer:
1composer require mergeloop/conduit
Next, add the Conduit trait to your User model:
1class User extends Authenticatable2{3 use \Mergeloop\Conduit\Conduit; 4}
Also, edit your User model to include Filament and Spatie Roles:
1use Filament\Models\Contracts\FilamentUser; 2use Filament\Panel; 3use Illuminate\Foundation\Auth\User as Authenticatable; 4use Illuminate\Notifications\Notifiable; 5use Spatie\Permission\Traits\HasRoles; 6 7class User extends Authenticatable implements FilamentUser 8{ 9 use HasRoles; 10 use Notifiable;11 use \Mergeloop\Conduit\Conduit;12 13 public function canAccessPanel(Panel $panel): bool 14 {15 return $this->hasAnyRole(['Super Admin', 'Admin', 'Editor', 'Viewer']);16 }17}
Run the migrations to create the necessary tables:
1php artisan migrate
Publish the Conduit and Spatie's Roles & Permission assets files:
1php artisan vendor:publish --provider="Mergeloop\Conduit\ConduitServiceProvider"2php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
You should add the following to your composer.json
file to always keep Conduit's assets up to date:
1"scripts": {2 "post-autoload-dump": [3 "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",4 "@php artisan package:discover --ansi",5 "@php artisan vendor:publish --provider=\"Mergeloop\\Conduit\\ConduitServiceProvider\" --tag=public --force" 6 "@php artisan filament:upgrade", 7 "@php artisan vendor:publish --tag=livewire:assets --ansi --force" 8 ]9 },
After installing and configuring this package, you should set up your payment provider and put those API keys
into your .env
file. Then run the installation command:
1php artisan conduit:install
It is recommended to ignore these files and directories in your .gitignore
file:
1/public/vendor/conduit2/public/css/filament3/public/js/filament4auth.json
If you're using Tailwind CSS, you should add the following to your tailwind.config.js
file:
1module.exports = {2 content: [3 './resources/**/*.blade.php',4 './resources/**/*.js',5 './vendor/mergeloop/**/resources/views/**/*.blade.php', 6 ],