-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
48 lines (33 loc) · 1.23 KB
/
config.php
File metadata and controls
48 lines (33 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
use Illuminate\Support\Str;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Translation\FileLoader;
use Illuminate\Translation\Translator;
return [
'production' => false,
'baseUrl' => 'http://localhost:3000',
'local' => 'en',
'author' => "Shakir El Amrani",
'email' => 'contact@amranich.dev',
'docUrl' => 'https://doc.amranich.dev',
'changeLogUrl' => 'https://github.com/AmraniCh/amranich.dev/blob/master/CHANGELOG.md',
'links' => [
'github' => 'https://github.com/amranich',
'behance' => 'https://www.behance.net/amranich',
'linkedin' => 'https://www.linkedin.com/in/amranich',
'stackoverflow' => 'https://stackoverflow.com/u/12919545',
'twitter' => 'https://x.com/amranich'
],
// helpers
'trans' => function ($page, $key, $locale = null) {
if (!$locale) {
$locale = $page->locale;
}
$loader = new FileLoader(new Filesystem(), __DIR__ . '/lang');
$translator = new Translator($loader, $locale);
return $translator->get($key);
},
'selected' => function ($page, $section) {
return Str::contains($page->getPath(), $section) ? 'selected' : '';
},
];