This commit is contained in:
Mekan1206
2026-04-30 19:50:59 +05:00
parent 6dc6802445
commit a07c764dfe
142 changed files with 2709 additions and 1914 deletions

View File

@@ -1,5 +1,12 @@
<?php
use App\Providers\ApiServiceProvider;
use App\Providers\AppServiceProvider;
use App\Providers\AuthServiceProvider;
use App\Providers\BroadcastServiceProvider;
use App\Providers\EventServiceProvider;
use App\Providers\NovaServiceProvider;
use App\Providers\RouteServiceProvider;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\ServiceProvider;
@@ -176,17 +183,17 @@ return [
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\NovaServiceProvider::class,
App\Providers\RouteServiceProvider::class,
AppServiceProvider::class,
AuthServiceProvider::class,
BroadcastServiceProvider::class,
EventServiceProvider::class,
NovaServiceProvider::class,
RouteServiceProvider::class,
/*
* CS Service Providers...
*/
App\Providers\ApiServiceProvider::class,
ApiServiceProvider::class,
])->toArray(),
/*

View File

@@ -1,5 +1,7 @@
<?php
use App\Models\User;
return [
/*
@@ -62,7 +64,7 @@ return [
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
'model' => User::class,
],
// 'users' => [

131
config/basement.php Normal file
View File

@@ -0,0 +1,131 @@
<?php
declare(strict_types=1);
use App\Models\User;
use BasementChat\Basement\Enums\AvatarStyle;
use BasementChat\Basement\Enums\ChatBoxPosition;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful;
return [
/*
|--------------------------------------------------------------------------
| Laravel Echo Broadcast Options
|--------------------------------------------------------------------------
|
| Here is the configuration where you can set the options used on client-
| side Laravel Echo. For server-side broadcasting options, please refer to
| /config/broadcasting.php file. The "default" value below should be
| available as an array key inside "connections".
|
*/
'broadcaster' => [
'default' => env('BASEMENT_BROADCAST_DRIVER', 'null'),
'connections' => [
'pusher' => [
'broadcaster' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
'ably' => [
'broadcaster' => 'pusher',
'key' => env('ABLY_PUBLIC_KEY'),
'wsHost' => 'realtime-pusher.ably.io',
'wsPort' => 443,
'disableStats' => true,
'encrypted' => true,
],
'laravel-websockets' => [
'broadcaster' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'wsHost' => '127.0.0.1',
'wsPort' => 6001,
'forceTLS' => false,
'disableStats' => true,
],
'soketi' => [
'broadcaster' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'wsHost' => env('PUSHER_HOST'),
'wsPort' => env('PUSHER_PORT'),
'wssPort' => env('PUSHER_PORT'),
'forceTLS' => false,
'encrypted' => true,
'disableStats' => true,
'enabledTransports' => ['ws', 'wss'],
],
'null' => [
],
],
],
/*
|--------------------------------------------------------------------------
| Chat Box Widget Position
|--------------------------------------------------------------------------
|
| Configure where you want to place the chat box widget view. If you have
| advanced configuration, feel free to publish the view and modify it as
| you wish.
|
*/
'chat_box_widget_position' => (string) ChatBoxPosition::bottomRight(),
/*
|--------------------------------------------------------------------------
| User Model
|--------------------------------------------------------------------------
|
| Specify the namespace and class used to get the user model instance. The
| given class must extend the "Illuminate\Foundation\Auth\User" and
| implement the "BasementChat\Basement\Contracts\User".
|
*/
'user_model' => User::class,
/*
|--------------------------------------------------------------------------
| Avatar
|--------------------------------------------------------------------------
|
| You can change the avatar's appearance in the contact list according to
| the styles available in https://avatars.dicebear.com/. If you have other
| avatar preferences (such as the user's real photo uploaded on your site),
| you can override the "getAvatarAttribute" accessor function in your user
| model.
|
*/
'avatar' => [
'style' => (string) AvatarStyle::micah(),
'options' => [
'b' => '%233584e4',
'size' => 64,
],
],
/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
|
| Basement frontend uses API calls to get contacts and private messages
| data. Here you can configure what middleware should be passed when
| processing requests.
|
*/
'middleware' => [
EnsureFrontendRequestsAreStateful::class,
'throttle:api',
SubstituteBindings::class,
'auth:sanctum',
],
];

View File

@@ -206,7 +206,7 @@ return [
],
'views' => [
'timeline' => false, // Add the views to the timeline (Experimental)
'data' => false, //Note: Can slow down the application, because the data can be quite large..
'data' => false, // Note: Can slow down the application, because the data can be quite large..
'exclude_paths' => [], // Add the paths which you don't want to appear in the views
],
'route' => [

View File

@@ -1,10 +1,12 @@
<?php
use Spatie\DeletedModels\Models\DeletedModel;
return [
/*
* The model uses to store deleted models.
*/
'model' => Spatie\DeletedModels\Models\DeletedModel::class,
'model' => DeletedModel::class,
/*
* After this amount of days, the records in `deleted_models` will be deleted

View File

@@ -14,9 +14,9 @@ return [
'host' => env('DS_APP_HOST', '127.0.0.1'),
//'host' => 'host.docker.internal', //Docker on Mac or Windows
//'host' => '127.0.0.1', //Homestead with the VirtualBox provider,
//'host' => '10.211.55.2', //Homestead with the Parallels provider,
// 'host' => 'host.docker.internal', //Docker on Mac or Windows
// 'host' => '127.0.0.1', //Homestead with the VirtualBox provider,
// 'host' => '10.211.55.2', //Homestead with the Parallels provider,
/*
|--------------------------------------------------------------------------
@@ -340,7 +340,7 @@ return [
base_path('resources'),
],
'ignore_line_when_contains_text' => [
//'ads()'
// 'ads()'
],
'text_to_search' => [
'ds(',

View File

@@ -1,5 +1,27 @@
<?php
use Spatie\ImageOptimizer\Optimizers\Cwebp;
use Spatie\ImageOptimizer\Optimizers\Gifsicle;
use Spatie\ImageOptimizer\Optimizers\Jpegoptim;
use Spatie\ImageOptimizer\Optimizers\Optipng;
use Spatie\ImageOptimizer\Optimizers\Pngquant;
use Spatie\ImageOptimizer\Optimizers\Svgo;
use Spatie\MediaLibrary\Conversions\ImageGenerators\Image;
use Spatie\MediaLibrary\Conversions\ImageGenerators\Pdf;
use Spatie\MediaLibrary\Conversions\ImageGenerators\Svg;
use Spatie\MediaLibrary\Conversions\ImageGenerators\Video;
use Spatie\MediaLibrary\Conversions\ImageGenerators\Webp;
use Spatie\MediaLibrary\Conversions\Jobs\PerformConversionsJob;
use Spatie\MediaLibrary\Downloaders\DefaultDownloader;
use Spatie\MediaLibrary\MediaCollections\Models\Media;
use Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob;
use Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred;
use Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator;
use Spatie\MediaLibrary\Support\FileNamer\DefaultFileNamer;
use Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator;
use Spatie\MediaLibrary\Support\UrlGenerator\DefaultUrlGenerator;
use Spatie\MediaLibraryPro\Models\TemporaryUpload;
return [
/*
@@ -34,14 +56,14 @@ return [
/*
* The fully qualified class name of the media model.
*/
'media_model' => Spatie\MediaLibrary\MediaCollections\Models\Media::class,
'media_model' => Media::class,
/*
* The fully qualified class name of the model used for temporary uploads.
*
* This model is only used in Media Library Pro (https://medialibrary.pro)
*/
'temporary_upload_model' => Spatie\MediaLibraryPro\Models\TemporaryUpload::class,
'temporary_upload_model' => TemporaryUpload::class,
/*
* When enabled, Media Library Pro will only process temporary uploads that were uploaded
@@ -58,12 +80,12 @@ return [
/*
* This is the class that is responsible for naming generated files.
*/
'file_namer' => Spatie\MediaLibrary\Support\FileNamer\DefaultFileNamer::class,
'file_namer' => DefaultFileNamer::class,
/*
* The class that contains the strategy for determining a media file's path.
*/
'path_generator' => Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator::class,
'path_generator' => DefaultPathGenerator::class,
/*
* Here you can specify which path generator should be used for the given class.
@@ -78,7 +100,7 @@ return [
* When urls to files get generated, this class will be called. Use the default
* if your files are stored locally above the site root or on s3.
*/
'url_generator' => Spatie\MediaLibrary\Support\UrlGenerator\DefaultUrlGenerator::class,
'url_generator' => DefaultUrlGenerator::class,
/*
* Moves media on updating to keep path consistent. Enable it only with a custom
@@ -98,32 +120,32 @@ return [
* the optimizers that will be used by default.
*/
'image_optimizers' => [
Spatie\ImageOptimizer\Optimizers\Jpegoptim::class => [
Jpegoptim::class => [
'-m85', // set maximum quality to 85%
'--force', // ensure that progressive generation is always done also if a little bigger
'--strip-all', // this strips out all text information such as comments and EXIF data
'--all-progressive', // this will make sure the resulting image is a progressive one
],
Spatie\ImageOptimizer\Optimizers\Pngquant::class => [
Pngquant::class => [
'--force', // required parameter for this package
],
Spatie\ImageOptimizer\Optimizers\Optipng::class => [
Optipng::class => [
'-i0', // this will result in a non-interlaced, progressive scanned image
'-o2', // this set the optimization level to two (multiple IDAT compression trials)
'-quiet', // required parameter for this package
],
Spatie\ImageOptimizer\Optimizers\Svgo::class => [
Svgo::class => [
'--disable=cleanupIDs', // disabling because it is known to cause troubles
],
Spatie\ImageOptimizer\Optimizers\Gifsicle::class => [
Gifsicle::class => [
'-b', // required parameter for this package
'-O3', // this produces the slowest but best results
],
Spatie\ImageOptimizer\Optimizers\Cwebp::class => [
Cwebp::class => [
'-m 6', // for the slowest compression method in order to get the best compression.
'-pass 10', // for maximizing the amount of analysis pass.
'-mt', // multithreading for some speed improvements.
'-q 90', //quality factor that brings the least noticeable changes.
'-q 90', // quality factor that brings the least noticeable changes.
],
],
@@ -131,11 +153,11 @@ return [
* These generators will be used to create an image of media files.
*/
'image_generators' => [
Spatie\MediaLibrary\Conversions\ImageGenerators\Image::class,
Spatie\MediaLibrary\Conversions\ImageGenerators\Webp::class,
Spatie\MediaLibrary\Conversions\ImageGenerators\Pdf::class,
Spatie\MediaLibrary\Conversions\ImageGenerators\Svg::class,
Spatie\MediaLibrary\Conversions\ImageGenerators\Video::class,
Image::class,
Webp::class,
Pdf::class,
Svg::class,
Video::class,
],
/*
@@ -163,8 +185,8 @@ return [
* your custom jobs extend the ones provided by the package.
*/
'jobs' => [
'perform_conversions' => Spatie\MediaLibrary\Conversions\Jobs\PerformConversionsJob::class,
'generate_responsive_images' => Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class,
'perform_conversions' => PerformConversionsJob::class,
'generate_responsive_images' => GenerateResponsiveImagesJob::class,
],
/*
@@ -172,7 +194,7 @@ return [
* This is particularly useful when the url of the image is behind a firewall and
* need to add additional flags, possibly using curl.
*/
'media_downloader' => Spatie\MediaLibrary\Downloaders\DefaultDownloader::class,
'media_downloader' => DefaultDownloader::class,
'remote' => [
/*
@@ -196,7 +218,7 @@ return [
*
* https://docs.spatie.be/laravel-medialibrary/v9/advanced-usage/generating-responsive-images
*/
'width_calculator' => Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
'width_calculator' => FileSizeOptimizedWidthCalculator::class,
/*
* By default rendering media to a responsive image will add some javascript and a tiny placeholder.
@@ -208,7 +230,7 @@ return [
* This class will generate the tiny placeholder used for progressive image loading. By default
* the media library will use a tiny blurred jpg image.
*/
'tiny_placeholder_generator' => Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
'tiny_placeholder_generator' => Blurred::class,
],
/*

View File

@@ -78,8 +78,8 @@ return [
/*
* Change this if you want to name the related pivots other than defaults
*/
'role_pivot_key' => null, //default 'role_id',
'permission_pivot_key' => null, //default 'permission_id',
'role_pivot_key' => null, // default 'role_id',
'permission_pivot_key' => null, // default 'permission_id',
/*
* Change this if you want to name the related model primary key other than
@@ -145,7 +145,7 @@ return [
* When permissions or roles are updated the cache is flushed automatically.
*/
'expiration_time' => \DateInterval::createFromDateString('24 hours'),
'expiration_time' => DateInterval::createFromDateString('24 hours'),
/*
* The cache key used to store all permissions.

View File

@@ -1,5 +1,7 @@
<?php
use App\Http\Middleware\EncryptCookies;
use App\Http\Middleware\VerifyCsrfToken;
use Laravel\Sanctum\Sanctum;
return [
@@ -60,8 +62,8 @@ return [
*/
'middleware' => [
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
'verify_csrf_token' => VerifyCsrfToken::class,
'encrypt_cookies' => EncryptCookies::class,
],
];

View File

@@ -1,6 +1,7 @@
<?php
use Knuckles\Scribe\Extracting\Strategies;
use Knuckles\Scribe\Matching\RouteMatcher;
return [
@@ -430,7 +431,7 @@ INTRO
* [Advanced] Custom implementation of RouteMatcherInterface to customise how routes are matched
*
*/
'routeMatcher' => \Knuckles\Scribe\Matching\RouteMatcher::class,
'routeMatcher' => RouteMatcher::class,
/**
* For response calls, API resource responses and transformer responses,