This repository contains:
- a collection of Laravel Blade components for reuse across the toolbox and verify projects
- services for API integration with third-party services such as GPTZero
Projects will sync to this repository via Composer specifically pulling the main branch.
"repositories": [
{
"type": "vcs",
"url": "https://github.com/lunar-build/ap-verify-components"
}
],composer require lunar-build/ap-verify-components:dev-mainTo update to the latest version, run:
composer update lunar-build/ap-verify-components<x-ap-pie-chart
:value="$result->sentence_average_score * 100"
caption="Average score for all sentences"
>
{{ $percentage }}
</x-ap-pie-chart>The LaravelBladeComponentsServiceProvider.php file registers the components with the ap namespace.
To use the component styles ensure the project's vite.config.js file has an alias for this package in the vendor folder:
You only need to do this once:
resolve: {
alias: {
$apComponents: resolve(
"/vendor/lunar-build/ap-verify-components/src/components"
),
},
},then in your main Sass file import the styles:
@import '$apComponents/pie-chart/pie-chart';You can use the services provided in this package by including the relevant class via its namespace. For example, to use the GPTZero service:
use LunarBuild\ApVerifyComponents\Services\GptZeroService;
GptZeroService::detectGenAI($batch);