yormy / translationcaptain-laravel
Tracking of referrals in laravel
Requires
- php: ^7.4|^8.0
- ext-zip: *
- illuminate/auth: ^6.0|^7.0|^8.0
- illuminate/container: ^6.0|^7.0|^8.0
- illuminate/contracts: ^6.0|^7.0|^8.0
- illuminate/database: ^6.0|^7.0|^8.0
- laravel/framework: 8.*
- orchestra/testbench: ^v6.21.1
Requires (Dev)
- jaschilz/php-coverage-badger: ^2.0
- phpmd/phpmd: ^2.10.2
- phpstan/phpstan: ^0.12.99
- phpunit/phpunit: ^9.5.10
- psalm/plugin-laravel: ^1.5.1
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.6.0
- vimeo/psalm: ^4.10.0
This package is auto-updated.
Last update: 2025-03-09 15:59:31 UTC
README
Installation
You can install the package via composer:
composer require yormy/translationcaptain-laravel
You can publish and run the migrations with:
php artisan vendor:publish --provider="Yormy\TranslationcaptainLaravel\TranslationcaptainLaravelServiceProvider" --tag="migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="Yormy\TranslationcaptainLaravel\TranslationcaptainLaravelServiceProvider" --tag="config"
Setting up config
config/app.php replace:
Illuminate\Translation\TranslationServiceProvider::class
with
Yormy\TranslationcaptainLaravel\Providers\TranslationServiceProvider::class,
Without publishing your views and you use of VUE:
In your app.js
require("./../../vendor/yormy/translationcaptain-laravel/resources/assets/package.js")
rerun
run npm prod
Views publishing
Blade version
php artisan vendor:publish --provider="Yormy\TranslationcaptainLaravel\TranslationcaptainLaravelServiceProvider" --tag="blade"
Vue version
Note , this needs vuetify v-datatable and v-chip
php artisan vendor:publish --provider="Yormy\TranslationcaptainLaravel\TranslationcaptainLaravelServiceProvider" --tag="vue"
in your app.js
require("./../assets/vendor/translationcaptain-laravel/package")
rerun
run npm prod
Register your routes
User routes
For referrers to see their own statistics Make sure you publish these routes within your authentication middleware
Route::TranslationcaptainLaravelUser('translationcaptain-laravel');
This makes the routes available as /translationcaptain-laravel/details
Admin routes
Your admin routes to see the referrers overview Make sure you publish these routes within your authentication middleware
Route::TranslationcaptainLaravelAdmin('translationcaptain-laravel');
This makes the routes available as /translationcaptain-laravel/referrers
Usage
$translationcaptain-laravel = new Yormy\TranslationcaptainLaravel();
echo $translationcaptain-laravel->echoPhrase('Hello, Yormy!');
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.