PHP code example of jeanpierregassin / laravel-geo
1. Go to this page and download the library: Download jeanpierregassin/laravel-geo library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
'structured_data' => [
'type' => 'Organization', // any schema.org type
'url' => env('APP_URL'),
],
use JeanPierreGassin\LaravelGeo\Enums\GenerativeEngine;
if ($request->isFromGenerativeEngine()) {
$engine = $request->generativeEngine();
if ($engine === GenerativeEngine::ClaudeBot) {
// Serve a citation-friendly response.
}
}
use JeanPierreGassin\LaravelGeo\Enums\GenerativeEngineType;
if ($request->generativeEngine()?->type() === GenerativeEngineType::Search) {
// Invest in a rich, citation-friendly response for answer engines.
}
Route::middleware('geo.detect')->group(function () {
// Detection runs only on these routes.
});
use JeanPierreGassin\LaravelGeo\Facades\Geo;
Geo::siteProfile(); // SiteProfile: the structured site profile
Geo::llmsTxt(); // string: the rendered llms.txt Markdown document
Geo::schemaGraph(); // SchemaGraph: the schema.org graph advertised to engines
Geo::renderHead(); // string: the JSON-LD <script> markup emitted by @geo
bash
php artisan vendor:publish --tag=geo-config
bash
php artisan vendor:publish --tag=geo-views
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.