1. Go to this page and download the library: Download mbsoft31/slr-ranking 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/ */
mbsoft31 / slr-ranking example snippets
return [
'half_life' => 3.0, // years for recency decay
'default_weights' => [
'venue' => 0.30, 'recency' => 0.15, 'oa' => 0.05,
'novelty' => 0.20, 'realism' => 0.20, 'breadth' => 0.10,
],
'user_model' => \App\Models\User::class,
'endpoints' => [
'openalex' => env('OPENALEX_BASE', 'https://api.openalex.org'),
'crossref' => env('CROSSREF_BASE', 'https://api.crossref.org'),
'unpaywall'=> 'https://api.unpaywall.org/v2',
's2' => env('S2_BASE', 'https://api.semanticscholar.org/graph/v1'),
'arxiv' => env('ARXIV_BASE', 'https://export.arxiv.org/api'),
],
'unpaywall_email' => env('UNPAYWALL_EMAIL'),
// Optional search: set to 'scout' to enable Laravel Scout indexing
'search_driver' => env('SLR_SEARCH', null),
'features' => [
// If true, venue quality falls back to a capped percentile of citations when SJR/CORE missing.
'citations_percentile_fallback' => true,
],
];