Chore: Upgrade to Laravel 12 + remove Mary and Jetstream dependencies (#141)
* docs: remove requirement for setting APP_KEY manually * optimize date picker * clean up modals * spot light working * reorganization * add lazy load * wip * remove filament * styling
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
trait HasLocalizedMarkdown
|
||||
{
|
||||
public function localizedMarkdownPath($name)
|
||||
{
|
||||
$localName = preg_replace('#(\.md)$#i', '.'.app()->getLocale().'$1', $name);
|
||||
|
||||
return Arr::first([
|
||||
resource_path('markdown/'.$localName),
|
||||
resource_path('markdown/'.$name),
|
||||
], function ($path) {
|
||||
return file_exists($path);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user