Skip to content

Commit

Permalink
because of case differences
Browse files Browse the repository at this point in the history
  • Loading branch information
mlantz committed Oct 7, 2024
1 parent 70d4802 commit f7c906c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
}
}

if (base_path('CHANGELOG.md')) {
$sections['change_log'] = file_get_contents(base_path('CHANGELOG.md'));
}

if (base_path('changelog.md')) {
$sections['changelog.md'] = file_get_contents(base_path('changelog.md'));
$sections['change_log'] = file_get_contents(base_path('changelog.md'));
}

return view('support::docs', [
Expand Down
3 changes: 3 additions & 0 deletions src/SupportProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public function boot()
if (base_path('changelog.md')) {
return '<?php echo preg_match("/## (.*?) -/", file_get_contents(base_path(\'changelog.md\')), $matches) ? str_replace(\'[\', \'\', str_replace(\']\', \'\', $matches[1])) : ""; ?>';
}
if (base_path('CHANGELOG.md')) {
return '<?php echo preg_match("/## (.*?) -/", file_get_contents(base_path(\'CHANGELOG.md\')), $matches) ? str_replace(\'[\', \'\', str_replace(\']\', \'\', $matches[1])) : ""; ?>';
}
});

Blade::directive('docs', function () {
Expand Down

0 comments on commit f7c906c

Please sign in to comment.