book cases added

This commit is contained in:
Benjamin Takats
2022-12-07 14:57:15 +01:00
parent e5b4666d4e
commit ce8f87db6f
59 changed files with 2175 additions and 142 deletions

145
config/comments.php Normal file
View File

@@ -0,0 +1,145 @@
<?php
use Spatie\Comments\Notifications\ApprovedCommentNotification;
use Spatie\Comments\Notifications\PendingCommentNotification;
use Spatie\Comments\Actions\SendNotificationsForApprovedCommentAction;
use Spatie\Comments\Actions\RejectCommentAction;
use Spatie\Comments\Actions\ApproveCommentAction;
use Spatie\Comments\Actions\SendNotificationsForPendingCommentAction;
use Spatie\Comments\Actions\ProcessCommentAction;
use Spatie\Comments\Models\Reaction;
use Spatie\Comments\Models\Comment;
use Spatie\Comments\CommentTransformers\MarkdownToHtmlTransformer;
use Spatie\Comments\Models\CommentNotificationSubscription;
use Spatie\Comments\Support\CommentSanitizer;
return [
/*
* These are the reactions that can be made on a comment. We highly recommend
* only enabling positive ones for getting good vibes in your community.
*/
'allowed_reactions' => ['👍', '🔥', '🥳', '👀', '😍', '⚡'],
/*
* You can allow guests to post comments. They will not be able to use
* reactions.
*/
'allow_anonymous_comments' => false,
/*
* A comment transformer is a class that will transform the comment text
* for example from Markdown to HTML
*/
'comment_transformers' => [
MarkdownToHtmlTransformer::class,
],
/*
* After all transformers have transformed the comment text, it will
* be passed to this class to sanitize it
*/
'comment_sanitizer' => CommentSanitizer::class,
/*
* Comments need to be approved before they are shown. You can opt
* to have all comments to be approved automatically.
*/
'automatically_approve_all_comments' => true,
'models' => [
/*
* The class that will comment on other things. Typically, this
* would be a user model.
*/
'commentator' => App\Models\User::class,
/*
* The field to use to display the name from the commentator model.
*/
'name' => 'name',
/*
* The model you want to use as a Comment model. It needs to be or
* extend the `Spatie\Comments\Models\Comment::class` model.
*/
'comment' => Comment::class,
/*
* The model you want to use as a React model. It needs to be or
* extend the `Spatie\Comments\Models\Reaction::class` model.
*/
'reaction' => Reaction::class,
/*
* The model you want to use as an opt-out model. It needs to be or
* extend the `Spatie\Comments\Models\CommentNotificationSubscription::class` model.
*/
'comment_notification_subscription' => CommentNotificationSubscription::class,
],
'notifications' => [
/*
* When somebody creates a comment, a notification will be sent to other persons
* that commented on the same thing.
*/
'enabled' => true,
'notifications' => [
'pending_comment' => PendingCommentNotification::class,
'approved_comment' => ApprovedCommentNotification::class,
],
/*
* Here you can configure the notifications that will be sent via mail.
*/
'mail' => [
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
],
],
'pagination' => [
/*
* Here you can configure the number of results to show before
* pagination links are displayed.
*/
'results' => 10000,
/*
* If you have multiple paginators on the same page, you can configure the
* query string page name to avoid conflicts with the other paginator.
* For example, you could set the page_name to be 'comments_page'.
*/
'page_name' => 'page',
/*
* You can choose a different pagination theme like "simple-tailwind" or build
* a custom pagination "vendor.livewire.custom-pagination" See the livewire
* docs for more information: https://laravel-livewire.com/docs/2.x/pagination#custom-pagination-view
*/
'theme' => 'tailwind',
],
/*
* Unless you need fine-grained customization, you don't need to change
* these action classes. If you do change any of them, make sure that your class
* extends the original action class.
*/
'actions' => [
'process_comment' => ProcessCommentAction::class,
'send_notifications_for_pending_comment' => SendNotificationsForPendingCommentAction::class,
'approve_comment' => ApproveCommentAction::class,
'reject_comment' => RejectCommentAction::class,
'send_notifications_for_approved_comment' => SendNotificationsForApprovedCommentAction::class,
],
'gravatar' => [
/*
* Here you can choose which default image to show when a user does not have a Gravatar profile.
* See the Gravatar docs for further information https://en.gravatar.com/site/implement/images/
*/
'default_image' => 'mp',
],
];

92
config/markdown.php Normal file
View File

@@ -0,0 +1,92 @@
<?php
return [
'code_highlighting' => [
/*
* To highlight code, we'll use Shiki under the hood. Make sure it's installed.
*
* More info: https://spatie.be/docs/laravel-markdown/v1/installation-setup
*/
'enabled' => true,
/*
* The name of or path to a Shiki theme
*
* More info: https://github.com/shikijs/shiki/blob/master/docs/themes.md
*/
'theme' => 'github-dark',
],
/*
* When enabled, anchor links will be added to all titles
*/
'add_anchors_to_headings' => true,
/*
* These options will be passed to the league/commonmark package which is
* used under the hood to render markdown.
*
* More info: https://spatie.be/docs/laravel-markdown/v1/using-the-blade-component/passing-options-to-commonmark
*/
'commonmark_options' => [],
/*
* Rendering markdown to HTML can be resource intensive. By default
* we'll cache the results.
*
* You can specify the name of a cache store here. When set to `null`
* the default cache store will be used. If you do not want to use
* caching set this value to `false`.
*/
'cache_store' => null,
/*
* This class will convert markdown to HTML
*
* You can change this to a class of your own to greatly
* customize the rendering process
*
* More info: https://spatie.be/docs/laravel-markdown/v1/advanced-usage/customizing-the-rendering-process
*/
'renderer_class' => Spatie\LaravelMarkdown\MarkdownRenderer::class,
/*
* These extensions should be added to the markdown environment. A valid
* extension implements League\CommonMark\Extension\ExtensionInterface
*
* More info: https://commonmark.thephpleague.com/2.1/extensions/overview/
*/
'extensions' => [
//
],
/*
* These block renderers should be added to the markdown environment. A valid
* renderer implements League\CommonMark\Renderer\NodeRendererInterface;
*
* More info: https://commonmark.thephpleague.com/2.1/customization/rendering/
*/
'block_renderers' => [
// ['class' => FencedCode::class, 'renderer' => new MyCustomCodeRenderer(), 'priority' => 0]
],
/*
* These inline renderers should be added to the markdown environment. A valid
* renderer implements League\CommonMark\Renderer\NodeRendererInterface;
*
* More info: https://commonmark.thephpleague.com/2.1/customization/rendering/
*/
'inline_renderers' => [
// ['class' => FencedCode::class, 'renderer' => new MyCustomCodeRenderer(), 'priority' => 0]
],
/*
* These inline parsers should be added to the markdown environment. A valid
* parser implements League\CommonMark\Renderer\InlineParserInterface;
*
* More info: https://commonmark.thephpleague.com/2.3/customization/inline-parsing/
*/
'inline_parsers' => [
// ['parser' => new MyCustomInlineParser(), 'priority' => 0]
],
];