sina_sajjadi
1 month ago
835 changed files with 106481 additions and 0 deletions
-
15.editorconfig
-
169.env.example
-
5.gitattributes
-
20.gitignore
-
13.styleci.yml
-
8Dockerfile
-
41app/Console/Kernel.php
-
40app/Exceptions/Handler.php
-
13app/Http/Controllers/Controller.php
-
66app/Http/Kernel.php
-
21app/Http/Middleware/Authenticate.php
-
17app/Http/Middleware/EncryptCookies.php
-
17app/Http/Middleware/PreventRequestsDuringMaintenance.php
-
32app/Http/Middleware/RedirectIfAuthenticated.php
-
18app/Http/Middleware/TrimStrings.php
-
20app/Http/Middleware/TrustHosts.php
-
29app/Http/Middleware/TrustProxies.php
-
17app/Http/Middleware/VerifyCsrfToken.php
-
43app/Models/User.php
-
32app/Providers/AppServiceProvider.php
-
30app/Providers/AuthServiceProvider.php
-
21app/Providers/BroadcastServiceProvider.php
-
32app/Providers/EventServiceProvider.php
-
63app/Providers/RouteServiceProvider.php
-
53artisan
-
55bootstrap/app.php
-
2bootstrap/cache/.gitignore
-
90composer.json
-
14190composer.lock
-
231config/app.php
-
117config/auth.php
-
64config/broadcasting.php
-
104config/cache.php
-
34config/cors.php
-
147config/database.php
-
73config/filesystems.php
-
31config/flutterwave.php
-
52config/hashing.php
-
104config/logging.php
-
110config/mail.php
-
21config/money.php
-
26config/pdf.php
-
86config/purify.php
-
89config/queue.php
-
33config/services.php
-
201config/session.php
-
141config/sluggable.php
-
36config/view.php
-
2database/.gitignore
-
33database/factories/UserFactory.php
-
36database/migrations/2014_10_12_000000_create_users_table.php
-
32database/migrations/2014_10_12_100000_create_password_resets_table.php
-
36database/migrations/2019_08_19_000000_create_failed_jobs_table.php
-
36database/migrations/2022_04_11_094659_create_jobs_table.php
-
29database/seeders/DatabaseSeeder.php
-
51install.sh
-
20lang/en/auth.php
-
19lang/en/pagination.php
-
22lang/en/passwords.php
-
152lang/en/validation.php
-
21package.json
-
14packages/marvel/.gitignore
-
1packages/marvel/.styleci.yml
-
77packages/marvel/composer.json
-
133packages/marvel/config/auth.php
-
64packages/marvel/config/broadcasting.php
-
105packages/marvel/config/cache.php
-
71packages/marvel/config/constants.php
-
34packages/marvel/config/cors.php
-
31packages/marvel/config/flutterwave.php
-
64packages/marvel/config/graphiql.php
-
49packages/marvel/config/graphql-playground.php
-
29packages/marvel/config/laravel-omnipay.php
-
600packages/marvel/config/lighthouse.php
-
215packages/marvel/config/media-library.php
-
47packages/marvel/config/newsletter.php
-
38packages/marvel/config/paystack.php
-
187packages/marvel/config/permission.php
-
249packages/marvel/config/repository.php
-
48packages/marvel/config/sanctum.php
-
91packages/marvel/config/scout.php
-
57packages/marvel/config/services.php
-
114packages/marvel/config/shop.php
-
147packages/marvel/config/sluggable.php
-
133packages/marvel/config/sslcommerz.php
-
114packages/marvel/database/migrations/2020_04_17_194830_create_permission_tables.php
-
280packages/marvel/database/migrations/2020_06_02_051901_create_marvel_tables.php
-
40packages/marvel/database/migrations/2020_10_26_163529_create_media_table.php
-
226packages/marvel/database/migrations/2021_04_17_051901_create_new_marvel_tables.php
-
61packages/marvel/database/migrations/2021_08_08_051901_create_wallet_table.php
-
77packages/marvel/database/migrations/2021_09_26_051901_create_product_type_table.php
-
88packages/marvel/database/migrations/2021_10_12_193855_create_reviews_table.php
-
104packages/marvel/database/migrations/2022_01_19_051901_create_rental_tables.php
-
95packages/marvel/database/migrations/2022_01_31_051901_create_marvel_languages_tables.php
-
37packages/marvel/database/migrations/2022_03_23_051901_create_marvel_delivery_time_tables.php
-
59packages/marvel/database/migrations/2022_03_23_051902_create_marvel_store_notice_tables.php
-
51packages/marvel/database/migrations/2022_03_24_124527_add_columns_to_table.php
-
76packages/marvel/database/migrations/2022_05_09_070829_create_messages_table.php
-
32packages/marvel/database/migrations/2023_05_10_154638_add_column_to_order_table.php
-
37packages/marvel/database/migrations/2023_07_12_030502_create_notify_logs_table.php
@ -0,0 +1,15 @@ |
|||
root = true |
|||
|
|||
[*] |
|||
charset = utf-8 |
|||
end_of_line = lf |
|||
insert_final_newline = true |
|||
indent_style = space |
|||
indent_size = 4 |
|||
trim_trailing_whitespace = true |
|||
|
|||
[*.md] |
|||
trim_trailing_whitespace = false |
|||
|
|||
[*.{yml,yaml}] |
|||
indent_size = 2 |
@ -0,0 +1,169 @@ |
|||
APP_NAME=ChawkBazar |
|||
APP_ENV=production |
|||
APP_KEY= |
|||
APP_DEBUG=false |
|||
APP_URL=http://localhost |
|||
APP_VERSION=6.6.0 |
|||
APP_SERVICE=marvel.test |
|||
APP_NOTICE_DOMAIN=MARVEL_ |
|||
DUMMY_DATA_PATH=chawkbazar |
|||
|
|||
# Multilang |
|||
# If you want to enable multilang then follow this doc -> https://pickbazar-doc.vercel.app/multilingual |
|||
TRANSLATION_ENABLED=false |
|||
DEFAULT_LANGUAGE=en |
|||
|
|||
LOG_CHANNEL=stack |
|||
LOG_LEVEL=debug |
|||
|
|||
DB_CONNECTION=mysql |
|||
DB_HOST=mysql |
|||
DB_PORT=3306 |
|||
DB_DATABASE=marvel_laravel |
|||
DB_USERNAME=marvel_laravel |
|||
DB_PASSWORD=1Amarvel@laravel |
|||
|
|||
BROADCAST_DRIVER=pusher |
|||
CACHE_DRIVER=file |
|||
QUEUE_CONNECTION=database |
|||
SESSION_DRIVER=file |
|||
SESSION_LIFETIME=120 |
|||
|
|||
MEMCACHED_HOST=memcached |
|||
|
|||
LIGHTHOUSE_CACHE_ENABLE=false |
|||
|
|||
REDIS_HOST=redis |
|||
REDIS_PASSWORD=null |
|||
REDIS_PORT=6379 |
|||
|
|||
# Email |
|||
# To configure email visit https://chawkbazar-laravel-doc.vercel.app/email-configuration |
|||
MAIL_MAILER=mailgun |
|||
MAIL_HOST=smtp.mailgun.org |
|||
MAILGUN_DOMAIN= |
|||
MAILGUN_SECRET= |
|||
MAIL_FROM_ADDRESS= |
|||
MAIL_PORT=1025 |
|||
MAIL_USERNAME=null |
|||
MAIL_PASSWORD=null |
|||
MAIL_ENCRYPTION=null |
|||
ADMIN_EMAIL=support@example.com |
|||
|
|||
# File system |
|||
MEDIA_DISK=public |
|||
FILESYSTEM_DISK=local |
|||
|
|||
AWS_ACCESS_KEY_ID= |
|||
AWS_SECRET_ACCESS_KEY= |
|||
AWS_DEFAULT_REGION= |
|||
AWS_BUCKET= |
|||
|
|||
# Connect With Frontend |
|||
SHOP_URL= |
|||
DASHBOARD_URL= |
|||
|
|||
# To configure the payment gateway follow this doc -> https://pickbazar-doc.vercel.app/payment |
|||
# PAYMENT |
|||
ACTIVE_PAYMENT_GATEWAY=Stripe |
|||
DEFAULT_CURRENCY=USD |
|||
|
|||
# Payment -> Stripe |
|||
STRIPE_API_KEY= |
|||
STRIPE_WEBHOOK_SECRET_KEY= |
|||
# Payment -> Paypal |
|||
|
|||
# Add currency like USD |
|||
PAYPAL_CURRENCY= |
|||
# Change this accordingly for your application. |
|||
PAYPAL_NOTIFY_URL= |
|||
# force gateway language i.e. it_IT, es_ES, en_US ... (for express checkout only) |
|||
PAYPAL_LOCALE= |
|||
# Validate SSL when creating api client. |
|||
PAYPAL_VALIDATE_SSL= |
|||
|
|||
# Values: sandbox or live -> sanbox for development and live for production |
|||
PAYPAL_MODE= |
|||
|
|||
#PayPal Setting & API Credentials - sandbox |
|||
PAYPAL_SANDBOX_CLIENT_ID= |
|||
PAYPAL_SANDBOX_CLIENT_SECRET= |
|||
|
|||
#PayPal Setting & API Credentials - live |
|||
PAYPAL_LIVE_CLIENT_ID= |
|||
PAYPAL_LIVE_CLIENT_SECRET= |
|||
PAYPAL_WEBHOOK_ID= |
|||
PAYPAL_REDIRECT_URL= |
|||
|
|||
# Payment -> Mollie |
|||
MOLLIE_KEY= |
|||
MOLLIE_REDIRECT_URL= |
|||
MOLLIE_WEBHOOK_URL= |
|||
|
|||
# Payment -> Razorpay |
|||
RAZORPAY_KEY_ID= |
|||
RAZORPAY_KEY_SECRET= |
|||
RAZORPAY_WEBHOOK_SECRET_KEY= |
|||
|
|||
# Payment -> PayStack |
|||
PAYSTACK_PUBLIC_KEY= |
|||
PAYSTACK_SECRET_KEY= |
|||
PAYSTACK_PAYMENT_URL=https://api.paystack.co |
|||
MERCHANT_EMAIL= |
|||
|
|||
# Remove sandbox- for production |
|||
IYZIPAY_BASE_URL=https://sandbox-api.iyzipay.com |
|||
IYZIPAY_API_KEY=YOUR_KEY_HERE |
|||
IYZIPAY_SECRET_KEY=YOUR_SECRET_KEY_HERE |
|||
|
|||
# Payment -> bKash |
|||
BKASH_SANDBOX=true #for production use false |
|||
BKASH_APP_KEY="" |
|||
BKASH_APP_SECRET="" |
|||
BKASH_USERNAME="" |
|||
BKASH_PASSWORD="" |
|||
|
|||
# Payment -> Paymongo |
|||
PAYMONGO_SECRET_KEY= |
|||
PAYMONGO_PUBLIC_KEY= |
|||
# This is the secret from the webhook you created. |
|||
PAYMONGO_WEBHOOK_SIG= |
|||
|
|||
# Payment -> Flutterwave |
|||
FLW_PUBLIC_KEY= |
|||
FLW_SECRET_KEY= |
|||
FLW_SECRET_HASH= |
|||
|
|||
# AI --> OpenAi |
|||
OPENAI_SECRET_KEY= |
|||
|
|||
# Social Login |
|||
GOOGLE_CLIENT_ID= |
|||
GOOGLE_CLIENT_SECRET= |
|||
GOOGLE_REDIRECT_URI=http://127.0.0.1/login/google/callback |
|||
|
|||
FACEBOOK_CLIENT_ID= |
|||
FACEBOOK_CLIENT_SECRET= |
|||
FACEBOOK_REDIRECT_URI=https://127.0.0.1/login/facebook/callback |
|||
|
|||
# Mailchimp Newslater |
|||
NEWSLETTER_API_KEY= |
|||
NEWSLETTER_LIST_ID= |
|||
|
|||
# OTP Message System |
|||
ACTIVE_OTP_GATEWAY=twilio |
|||
|
|||
TWILIO_AUTH_TOKEN= |
|||
TWILIO_ACCOUNT_SID= |
|||
TWILIO_VERIFICATION_SID= |
|||
TWILIO_FROM_NUMBER= |
|||
|
|||
MESSAGEBIRD_API_KEY= |
|||
MESSAGEBIRD_ORIGINATOR=Marvel |
|||
|
|||
# PUSHER_ENABLED is either true or false |
|||
PUSHER_ENABLED=true |
|||
PUSHER_APP_ID=1697086 |
|||
PUSHER_APP_KEY=4f67daf566b719c6f606 |
|||
PUSHER_APP_SECRET=fa0152a9a28112e6e164 |
|||
PUSHER_APP_CLUSTER=ap2 |
@ -0,0 +1,5 @@ |
|||
* text=auto |
|||
*.css linguist-vendored |
|||
*.scss linguist-vendored |
|||
*.js linguist-vendored |
|||
CHANGELOG.md export-ignore |
@ -0,0 +1,20 @@ |
|||
/node_modules |
|||
/public/hot |
|||
/public/storage |
|||
/public/license |
|||
/storage/*.key |
|||
/storage/framework/cache |
|||
/storage/debugbar |
|||
/vendor |
|||
.env |
|||
.env.backup |
|||
.phpunit.result.cache |
|||
docker-compose.override.yml |
|||
Homestead.json |
|||
Homestead.yaml |
|||
npm-debug.log |
|||
yarn-error.log |
|||
.DS_Store |
|||
docker-compose.yml |
|||
.idea |
|||
.vscode |
@ -0,0 +1,13 @@ |
|||
php: |
|||
preset: laravel |
|||
disabled: |
|||
- no_unused_imports |
|||
finder: |
|||
not-name: |
|||
- index.php |
|||
- server.php |
|||
js: |
|||
finder: |
|||
not-name: |
|||
- webpack.mix.js |
|||
css: true |
@ -0,0 +1,8 @@ |
|||
FROM laravelsail/php81-composer |
|||
|
|||
RUN apt-get update -y && apt-get install -y libpng-dev zlib1g-dev libicu-dev g++ |
|||
|
|||
RUN docker-php-ext-configure intl |
|||
|
|||
RUN docker-php-ext-install exif gd intl zip |
|||
|
@ -0,0 +1,41 @@ |
|||
<?php |
|||
|
|||
namespace App\Console; |
|||
|
|||
use Illuminate\Console\Scheduling\Schedule; |
|||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; |
|||
|
|||
class Kernel extends ConsoleKernel |
|||
{ |
|||
/** |
|||
* The Artisan commands provided by your application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $commands = [ |
|||
//
|
|||
]; |
|||
|
|||
/** |
|||
* Define the application's command schedule. |
|||
* |
|||
* @param \Illuminate\Console\Scheduling\Schedule $schedule |
|||
* @return void |
|||
*/ |
|||
protected function schedule(Schedule $schedule) |
|||
{ |
|||
// $schedule->command('inspire')->hourly();
|
|||
} |
|||
|
|||
/** |
|||
* Register the commands for the application. |
|||
* |
|||
* @return void |
|||
*/ |
|||
protected function commands() |
|||
{ |
|||
$this->load(__DIR__.'/Commands'); |
|||
|
|||
require base_path('routes/console.php'); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
<?php |
|||
|
|||
namespace App\Exceptions; |
|||
|
|||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; |
|||
use Throwable; |
|||
|
|||
class Handler extends ExceptionHandler |
|||
{ |
|||
/** |
|||
* A list of the exception types that are not reported. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $dontReport = [ |
|||
//
|
|||
]; |
|||
|
|||
/** |
|||
* A list of the inputs that are never flashed for validation exceptions. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $dontFlash = [ |
|||
'password', |
|||
'password_confirmation', |
|||
]; |
|||
|
|||
/** |
|||
* Register the exception handling callbacks for the application. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function register() |
|||
{ |
|||
$this->reportable(function (Throwable $e) { |
|||
//
|
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Controllers; |
|||
|
|||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
|||
use Illuminate\Foundation\Bus\DispatchesJobs; |
|||
use Illuminate\Foundation\Validation\ValidatesRequests; |
|||
use Illuminate\Routing\Controller as BaseController; |
|||
|
|||
class Controller extends BaseController |
|||
{ |
|||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
|||
} |
@ -0,0 +1,66 @@ |
|||
<?php |
|||
|
|||
namespace App\Http; |
|||
|
|||
use Illuminate\Foundation\Http\Kernel as HttpKernel; |
|||
|
|||
class Kernel extends HttpKernel |
|||
{ |
|||
/** |
|||
* The application's global HTTP middleware stack. |
|||
* |
|||
* These middleware are run during every request to your application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $middleware = [ |
|||
// \App\Http\Middleware\TrustHosts::class,
|
|||
\App\Http\Middleware\TrustProxies::class, |
|||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class, |
|||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, |
|||
\App\Http\Middleware\TrimStrings::class, |
|||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, |
|||
\Illuminate\Http\Middleware\HandleCors::class, |
|||
]; |
|||
|
|||
/** |
|||
* The application's route middleware groups. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $middlewareGroups = [ |
|||
'web' => [ |
|||
\App\Http\Middleware\EncryptCookies::class, |
|||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
|||
\Illuminate\Session\Middleware\StartSession::class, |
|||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
|||
\Illuminate\View\Middleware\ShareErrorsFromSession::class, |
|||
\App\Http\Middleware\VerifyCsrfToken::class, |
|||
\Illuminate\Routing\Middleware\SubstituteBindings::class, |
|||
], |
|||
|
|||
'api' => [ |
|||
'throttle:api', |
|||
\Illuminate\Routing\Middleware\SubstituteBindings::class, |
|||
], |
|||
]; |
|||
|
|||
/** |
|||
* The application's route middleware. |
|||
* |
|||
* These middleware may be assigned to groups or used individually. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $routeMiddleware = [ |
|||
'auth' => \App\Http\Middleware\Authenticate::class, |
|||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, |
|||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, |
|||
'can' => \Illuminate\Auth\Middleware\Authorize::class, |
|||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, |
|||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, |
|||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, |
|||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, |
|||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, |
|||
]; |
|||
} |
@ -0,0 +1,21 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Auth\Middleware\Authenticate as Middleware; |
|||
|
|||
class Authenticate extends Middleware |
|||
{ |
|||
/** |
|||
* Get the path the user should be redirected to when they are not authenticated. |
|||
* |
|||
* @param \Illuminate\Http\Request $request |
|||
* @return string|null |
|||
*/ |
|||
protected function redirectTo($request) |
|||
{ |
|||
if (! $request->expectsJson()) { |
|||
return route('login'); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; |
|||
|
|||
class EncryptCookies extends Middleware |
|||
{ |
|||
/** |
|||
* The names of the cookies that should not be encrypted. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
//
|
|||
]; |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware; |
|||
|
|||
class PreventRequestsDuringMaintenance extends Middleware |
|||
{ |
|||
/** |
|||
* The URIs that should be reachable while maintenance mode is enabled. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
//
|
|||
]; |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use App\Providers\RouteServiceProvider; |
|||
use Closure; |
|||
use Illuminate\Http\Request; |
|||
use Illuminate\Support\Facades\Auth; |
|||
|
|||
class RedirectIfAuthenticated |
|||
{ |
|||
/** |
|||
* Handle an incoming request. |
|||
* |
|||
* @param \Illuminate\Http\Request $request |
|||
* @param \Closure $next |
|||
* @param string|null ...$guards |
|||
* @return mixed |
|||
*/ |
|||
public function handle(Request $request, Closure $next, ...$guards) |
|||
{ |
|||
$guards = empty($guards) ? [null] : $guards; |
|||
|
|||
foreach ($guards as $guard) { |
|||
if (Auth::guard($guard)->check()) { |
|||
return redirect(RouteServiceProvider::HOME); |
|||
} |
|||
} |
|||
|
|||
return $next($request); |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; |
|||
|
|||
class TrimStrings extends Middleware |
|||
{ |
|||
/** |
|||
* The names of the attributes that should not be trimmed. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
'password', |
|||
'password_confirmation', |
|||
]; |
|||
} |
@ -0,0 +1,20 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Http\Middleware\TrustHosts as Middleware; |
|||
|
|||
class TrustHosts extends Middleware |
|||
{ |
|||
/** |
|||
* Get the host patterns that should be trusted. |
|||
* |
|||
* @return array |
|||
*/ |
|||
public function hosts() |
|||
{ |
|||
return [ |
|||
$this->allSubdomainsOfApplicationUrl(), |
|||
]; |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Http\Middleware\TrustProxies as Middleware; |
|||
use Illuminate\Http\Request; |
|||
|
|||
class TrustProxies extends Middleware |
|||
{ |
|||
/** |
|||
* The trusted proxies for this application. |
|||
* |
|||
* @var array|string|null |
|||
*/ |
|||
protected $proxies; |
|||
|
|||
/** |
|||
* The headers that should be used to detect proxies. |
|||
* |
|||
* @var int |
|||
*/ |
|||
protected $headers = |
|||
Request::HEADER_X_FORWARDED_FOR | |
|||
Request::HEADER_X_FORWARDED_HOST | |
|||
Request::HEADER_X_FORWARDED_PORT | |
|||
Request::HEADER_X_FORWARDED_PROTO | |
|||
Request::HEADER_X_FORWARDED_AWS_ELB; |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; |
|||
|
|||
class VerifyCsrfToken extends Middleware |
|||
{ |
|||
/** |
|||
* The URIs that should be excluded from CSRF verification. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
//
|
|||
]; |
|||
} |
@ -0,0 +1,43 @@ |
|||
<?php |
|||
|
|||
namespace App\Models; |
|||
|
|||
use Illuminate\Contracts\Auth\MustVerifyEmail; |
|||
use Illuminate\Database\Eloquent\Factories\HasFactory; |
|||
use Illuminate\Foundation\Auth\User as Authenticatable; |
|||
use Illuminate\Notifications\Notifiable; |
|||
|
|||
class User extends Authenticatable |
|||
{ |
|||
use HasFactory, Notifiable; |
|||
|
|||
/** |
|||
* The attributes that are mass assignable. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $fillable = [ |
|||
'name', |
|||
'email', |
|||
'password', |
|||
]; |
|||
|
|||
/** |
|||
* The attributes that should be hidden for arrays. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $hidden = [ |
|||
'password', |
|||
'remember_token', |
|||
]; |
|||
|
|||
/** |
|||
* The attributes that should be cast to native types. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $casts = [ |
|||
'email_verified_at' => 'datetime', |
|||
]; |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Support\ServiceProvider; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class AppServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* Register any application services. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function register() |
|||
{ |
|||
//
|
|||
} |
|||
|
|||
/** |
|||
* Bootstrap any application services. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
Schema::defaultStringLength(191); |
|||
if (!\App::environment('local')) { |
|||
$this->app['request']->server->set('HTTPS', true); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; |
|||
use Illuminate\Support\Facades\Gate; |
|||
|
|||
class AuthServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* The policy mappings for the application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $policies = [ |
|||
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
|||
]; |
|||
|
|||
/** |
|||
* Register any authentication / authorization services. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
$this->registerPolicies(); |
|||
|
|||
//
|
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Support\Facades\Broadcast; |
|||
use Illuminate\Support\ServiceProvider; |
|||
|
|||
class BroadcastServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* Bootstrap any application services. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
Broadcast::routes(); |
|||
|
|||
require base_path('routes/channels.php'); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Auth\Events\Registered; |
|||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification; |
|||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; |
|||
use Illuminate\Support\Facades\Event; |
|||
|
|||
class EventServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* The event listener mappings for the application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $listen = [ |
|||
Registered::class => [ |
|||
SendEmailVerificationNotification::class, |
|||
], |
|||
]; |
|||
|
|||
/** |
|||
* Register any events for your application. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
//
|
|||
} |
|||
} |
@ -0,0 +1,63 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Cache\RateLimiting\Limit; |
|||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
|||
use Illuminate\Http\Request; |
|||
use Illuminate\Support\Facades\RateLimiter; |
|||
use Illuminate\Support\Facades\Route; |
|||
|
|||
class RouteServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* The path to the "home" route for your application. |
|||
* |
|||
* This is used by Laravel authentication to redirect users after login. |
|||
* |
|||
* @var string |
|||
*/ |
|||
public const HOME = '/home'; |
|||
|
|||
/** |
|||
* The controller namespace for the application. |
|||
* |
|||
* When present, controller route declarations will automatically be prefixed with this namespace. |
|||
* |
|||
* @var string|null |
|||
*/ |
|||
// protected $namespace = 'App\\Http\\Controllers';
|
|||
|
|||
/** |
|||
* Define your route model bindings, pattern filters, etc. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
$this->configureRateLimiting(); |
|||
|
|||
$this->routes(function () { |
|||
Route::prefix('api') |
|||
->middleware('api') |
|||
->namespace($this->namespace) |
|||
->group(base_path('routes/api.php')); |
|||
|
|||
Route::middleware('web') |
|||
->namespace($this->namespace) |
|||
->group(base_path('routes/web.php')); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Configure the rate limiters for the application. |
|||
* |
|||
* @return void |
|||
*/ |
|||
protected function configureRateLimiting() |
|||
{ |
|||
RateLimiter::for('api', function (Request $request) { |
|||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); |
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
#!/usr/bin/env php |
|||
<?php |
|||
|
|||
define('LARAVEL_START', microtime(true)); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Register The Auto Loader |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Composer provides a convenient, automatically generated class loader |
|||
| for our application. We just need to utilize it! We'll require it |
|||
| into the script here so that we do not have to worry about the |
|||
| loading of any our classes "manually". Feels great to relax. |
|||
| |
|||
*/ |
|||
|
|||
require __DIR__.'/vendor/autoload.php'; |
|||
|
|||
$app = require_once __DIR__.'/bootstrap/app.php'; |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Run The Artisan Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When we run the console application, the current CLI command will be |
|||
| executed in this console and the response sent back to a terminal |
|||
| or another output device for the developers. Here goes nothing! |
|||
| |
|||
*/ |
|||
|
|||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); |
|||
|
|||
$status = $kernel->handle( |
|||
$input = new Symfony\Component\Console\Input\ArgvInput, |
|||
new Symfony\Component\Console\Output\ConsoleOutput |
|||
); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Shutdown The Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Once Artisan has finished running, we will fire off the shutdown events |
|||
| so that any final work may be done by the application before we shut |
|||
| down the process. This is the last thing to happen to the request. |
|||
| |
|||
*/ |
|||
|
|||
$kernel->terminate($input, $status); |
|||
|
|||
exit($status); |
@ -0,0 +1,55 @@ |
|||
<?php |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Create The Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The first thing we will do is create a new Laravel application instance |
|||
| which serves as the "glue" for all the components of Laravel, and is |
|||
| the IoC container for the system binding all of the various parts. |
|||
| |
|||
*/ |
|||
|
|||
$app = new Illuminate\Foundation\Application( |
|||
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) |
|||
); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Bind Important Interfaces |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Next, we need to bind some important interfaces into the container so |
|||
| we will be able to resolve them when needed. The kernels serve the |
|||
| incoming requests to this application from both the web and CLI. |
|||
| |
|||
*/ |
|||
|
|||
$app->singleton( |
|||
Illuminate\Contracts\Http\Kernel::class, |
|||
App\Http\Kernel::class |
|||
); |
|||
|
|||
$app->singleton( |
|||
Illuminate\Contracts\Console\Kernel::class, |
|||
App\Console\Kernel::class |
|||
); |
|||
|
|||
$app->singleton( |
|||
Illuminate\Contracts\Debug\ExceptionHandler::class, |
|||
App\Exceptions\Handler::class |
|||
); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Return The Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This script returns the application instance. The instance is given to |
|||
| the calling script so we can separate the building of the instances |
|||
| from the actual running of the application and sending responses. |
|||
| |
|||
*/ |
|||
|
|||
return $app; |
@ -0,0 +1,2 @@ |
|||
* |
|||
!.gitignore |
@ -0,0 +1,90 @@ |
|||
{ |
|||
"name": "redq/marvel", |
|||
"type": "project", |
|||
"description": "Marvel, a complete e-commerce engine for both rest and graphql", |
|||
"keywords": [ |
|||
"marvel", |
|||
"graphql", |
|||
"rest-api" |
|||
], |
|||
"license": "MIT", |
|||
"require": { |
|||
"php": "^8.0|^8.1", |
|||
"barryvdh/laravel-dompdf": "2.0.1", |
|||
"doctrine/dbal": "3.7.1", |
|||
"guzzlehttp/guzzle": "7.8.0", |
|||
"karim007/laravel-bkash-tokenize": "dev-main", |
|||
"laravel/framework": "10.30.1", |
|||
"laravel/socialite": "5.10.0", |
|||
"laravel/tinker": "2.8.2", |
|||
"marvel/shop": "dev-master", |
|||
"messagebird/php-rest-api": "3.1.4", |
|||
"psr/log": "3.0.0", |
|||
"stevebauman/purify": "6.0.2", |
|||
"symfony/http-client": "6.3.7", |
|||
"symfony/mailgun-mailer": "6.3.6", |
|||
"kingflamez/laravelrave": "dev-master" |
|||
}, |
|||
"require-dev": { |
|||
"fakerphp/faker": "1.21.0", |
|||
"laravel/sail": "1.21.0", |
|||
"mockery/mockery": "1.5.1", |
|||
"nunomaduro/collision": "7.0.5", |
|||
"phpunit/phpunit": "10.0.13", |
|||
"spatie/laravel-ignition": "2.0.0", |
|||
"squizlabs/php_codesniffer": "3.7.2" |
|||
}, |
|||
"config": { |
|||
"optimize-autoloader": true, |
|||
"preferred-install": "dist", |
|||
"sort-packages": true, |
|||
"allow-plugins": { |
|||
"php-http/discovery": true |
|||
} |
|||
}, |
|||
"extra": { |
|||
"laravel": { |
|||
"dont-discover": [] |
|||
} |
|||
}, |
|||
"autoload": { |
|||
"psr-4": { |
|||
"App\\": "app/", |
|||
"Database\\Factories\\": "database/factories/", |
|||
"Database\\Seeders\\": "database/seeders/" |
|||
} |
|||
}, |
|||
"autoload-dev": { |
|||
"psr-4": { |
|||
"Tests\\": "tests/" |
|||
} |
|||
}, |
|||
"minimum-stability": "dev", |
|||
"prefer-stable": true, |
|||
"scripts": { |
|||
"post-autoload-dump": [ |
|||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", |
|||
"@php artisan package:discover --ansi" |
|||
], |
|||
"post-root-package-install": [ |
|||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" |
|||
], |
|||
"post-create-project-cmd": [ |
|||
"@php artisan key:generate --ansi" |
|||
] |
|||
}, |
|||
"repositories": { |
|||
"marvel/shop": { |
|||
"type": "path", |
|||
"url": "packages/marvel" |
|||
}, |
|||
"marvel/bkash": { |
|||
"type": "vcs", |
|||
"url": "https://github.com/CodersFaruk/laravel-bkash-tokenize" |
|||
}, |
|||
"marvel/flutterwave": { |
|||
"type": "vcs", |
|||
"url": "https://github.com/CodersFaruk/laravel-flutterwave" |
|||
} |
|||
} |
|||
} |
14190
composer.lock
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,231 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Name |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This value is the name of your application. This value is used when the |
|||
| framework needs to place the application's name in a notification or |
|||
| any other location as required by the application or its packages. |
|||
| |
|||
*/ |
|||
|
|||
'name' => env('APP_NAME', 'Laravel'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Environment |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This value determines the "environment" your application is currently |
|||
| running in. This may determine how you prefer to configure various |
|||
| services the application utilizes. Set this in your ".env" file. |
|||
| |
|||
*/ |
|||
|
|||
'env' => env('APP_ENV', 'production'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Debug Mode |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When your application is in debug mode, detailed error messages with |
|||
| stack traces will be shown on every error that occurs within your |
|||
| application. If disabled, a simple generic error page is shown. |
|||
| |
|||
*/ |
|||
|
|||
'debug' => (bool) env('APP_DEBUG', false), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application URL |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This URL is used by the console to properly generate URLs when using |
|||
| the Artisan command line tool. You should set this to the root of |
|||
| your application so that it is used when running Artisan tasks. |
|||
| |
|||
*/ |
|||
|
|||
'url' => env('APP_URL', 'http://localhost'), |
|||
|
|||
'asset_url' => env('ASSET_URL', null), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Timezone |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify the default timezone for your application, which |
|||
| will be used by the PHP date and date-time functions. We have gone |
|||
| ahead and set this to a sensible default for you out of the box. |
|||
| |
|||
*/ |
|||
|
|||
'timezone' => 'UTC', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Locale Configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The application locale determines the default locale that will be used |
|||
| by the translation service provider. You are free to set this value |
|||
| to any of the locales which will be supported by the application. |
|||
| |
|||
*/ |
|||
|
|||
'locale' => 'en', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Fallback Locale |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The fallback locale determines the locale to use when the current one |
|||
| is not available. You may change the value to correspond to any of |
|||
| the language folders that are provided through your application. |
|||
| |
|||
*/ |
|||
|
|||
'fallback_locale' => 'en', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Faker Locale |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This locale will be used by the Faker PHP library when generating fake |
|||
| data for your database seeds. For example, this will be used to get |
|||
| localized telephone numbers, street address information and more. |
|||
| |
|||
*/ |
|||
|
|||
'faker_locale' => 'en_US', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Encryption Key |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This key is used by the Illuminate encrypter service and should be set |
|||
| to a random, 32 character string, otherwise these encrypted strings |
|||
| will not be safe. Please do this before deploying an application! |
|||
| |
|||
*/ |
|||
|
|||
'key' => env('APP_KEY'), |
|||
|
|||
'cipher' => 'AES-256-CBC', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Autoloaded Service Providers |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The service providers listed here will be automatically loaded on the |
|||
| request to your application. Feel free to add your own services to |
|||
| this array to grant expanded functionality to your applications. |
|||
| |
|||
*/ |
|||
|
|||
'providers' => [ |
|||
|
|||
/* |
|||
* Laravel Framework Service Providers... |
|||
*/ |
|||
Illuminate\Auth\AuthServiceProvider::class, |
|||
Illuminate\Broadcasting\BroadcastServiceProvider::class, |
|||
Illuminate\Bus\BusServiceProvider::class, |
|||
Illuminate\Cache\CacheServiceProvider::class, |
|||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, |
|||
Illuminate\Cookie\CookieServiceProvider::class, |
|||
Illuminate\Database\DatabaseServiceProvider::class, |
|||
Illuminate\Encryption\EncryptionServiceProvider::class, |
|||
Illuminate\Filesystem\FilesystemServiceProvider::class, |
|||
Illuminate\Foundation\Providers\FoundationServiceProvider::class, |
|||
Illuminate\Hashing\HashServiceProvider::class, |
|||
Illuminate\Mail\MailServiceProvider::class, |
|||
Illuminate\Notifications\NotificationServiceProvider::class, |
|||
Illuminate\Pagination\PaginationServiceProvider::class, |
|||
Illuminate\Pipeline\PipelineServiceProvider::class, |
|||
Illuminate\Queue\QueueServiceProvider::class, |
|||
Illuminate\Redis\RedisServiceProvider::class, |
|||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, |
|||
Illuminate\Session\SessionServiceProvider::class, |
|||
Illuminate\Translation\TranslationServiceProvider::class, |
|||
Illuminate\Validation\ValidationServiceProvider::class, |
|||
Illuminate\View\ViewServiceProvider::class, |
|||
|
|||
/* |
|||
* Package Service Providers... |
|||
*/ |
|||
|
|||
/* |
|||
* Application Service Providers... |
|||
*/ |
|||
App\Providers\AppServiceProvider::class, |
|||
App\Providers\AuthServiceProvider::class, |
|||
App\Providers\BroadcastServiceProvider::class, |
|||
App\Providers\EventServiceProvider::class, |
|||
App\Providers\RouteServiceProvider::class, |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Class Aliases |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This array of class aliases will be registered when this application |
|||
| is started. However, feel free to register as many as you wish as |
|||
| the aliases are "lazy" loaded so they don't hinder performance. |
|||
| |
|||
*/ |
|||
|
|||
'aliases' => [ |
|||
|
|||
'App' => Illuminate\Support\Facades\App::class, |
|||
'Arr' => Illuminate\Support\Arr::class, |
|||
'Artisan' => Illuminate\Support\Facades\Artisan::class, |
|||
'Auth' => Illuminate\Support\Facades\Auth::class, |
|||
'Blade' => Illuminate\Support\Facades\Blade::class, |
|||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class, |
|||
'Bus' => Illuminate\Support\Facades\Bus::class, |
|||
'Cache' => Illuminate\Support\Facades\Cache::class, |
|||
'Config' => Illuminate\Support\Facades\Config::class, |
|||
'Cookie' => Illuminate\Support\Facades\Cookie::class, |
|||
'Crypt' => Illuminate\Support\Facades\Crypt::class, |
|||
'DB' => Illuminate\Support\Facades\DB::class, |
|||
'Eloquent' => Illuminate\Database\Eloquent\Model::class, |
|||
'Event' => Illuminate\Support\Facades\Event::class, |
|||
'File' => Illuminate\Support\Facades\File::class, |
|||
'Gate' => Illuminate\Support\Facades\Gate::class, |
|||
'Hash' => Illuminate\Support\Facades\Hash::class, |
|||
'Http' => Illuminate\Support\Facades\Http::class, |
|||
'Lang' => Illuminate\Support\Facades\Lang::class, |
|||
'Log' => Illuminate\Support\Facades\Log::class, |
|||
'Mail' => Illuminate\Support\Facades\Mail::class, |
|||
'Notification' => Illuminate\Support\Facades\Notification::class, |
|||
'Password' => Illuminate\Support\Facades\Password::class, |
|||
'Queue' => Illuminate\Support\Facades\Queue::class, |
|||
'Redirect' => Illuminate\Support\Facades\Redirect::class, |
|||
// 'Redis' => Illuminate\Support\Facades\Redis::class,
|
|||
'Request' => Illuminate\Support\Facades\Request::class, |
|||
'Response' => Illuminate\Support\Facades\Response::class, |
|||
'Route' => Illuminate\Support\Facades\Route::class, |
|||
'Schema' => Illuminate\Support\Facades\Schema::class, |
|||
'Session' => Illuminate\Support\Facades\Session::class, |
|||
'Storage' => Illuminate\Support\Facades\Storage::class, |
|||
'Str' => Illuminate\Support\Str::class, |
|||
'URL' => Illuminate\Support\Facades\URL::class, |
|||
'Validator' => Illuminate\Support\Facades\Validator::class, |
|||
'View' => Illuminate\Support\Facades\View::class, |
|||
|
|||
], |
|||
|
|||
]; |
@ -0,0 +1,117 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Defaults |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default authentication "guard" and password |
|||
| reset options for your application. You may change these defaults |
|||
| as required, but they're a perfect start for most applications. |
|||
| |
|||
*/ |
|||
|
|||
'defaults' => [ |
|||
'guard' => 'web', |
|||
'passwords' => 'users', |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Guards |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Next, you may define every authentication guard for your application. |
|||
| Of course, a great default configuration has been defined for you |
|||
| here which uses session storage and the Eloquent user provider. |
|||
| |
|||
| All authentication drivers have a user provider. This defines how the |
|||
| users are actually retrieved out of your database or other storage |
|||
| mechanisms used by this application to persist your user's data. |
|||
| |
|||
| Supported: "session", "token" |
|||
| |
|||
*/ |
|||
|
|||
'guards' => [ |
|||
'web' => [ |
|||
'driver' => 'session', |
|||
'provider' => 'users', |
|||
], |
|||
|
|||
'api' => [ |
|||
'driver' => 'token', |
|||
'provider' => 'users', |
|||
'hash' => false, |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| User Providers |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| All authentication drivers have a user provider. This defines how the |
|||
| users are actually retrieved out of your database or other storage |
|||
| mechanisms used by this application to persist your user's data. |
|||
| |
|||
| If you have multiple user tables or models you may configure multiple |
|||
| sources which represent each model / table. These sources may then |
|||
| be assigned to any extra authentication guards you have defined. |
|||
| |
|||
| Supported: "database", "eloquent" |
|||
| |
|||
*/ |
|||
|
|||
'providers' => [ |
|||
'users' => [ |
|||
'driver' => 'eloquent', |
|||
'model' => App\Models\User::class, |
|||
], |
|||
|
|||
// 'users' => [
|
|||
// 'driver' => 'database',
|
|||
// 'table' => 'users',
|
|||
// ],
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Resetting Passwords |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| You may specify multiple password reset configurations if you have more |
|||
| than one user table or model in the application and you want to have |
|||
| separate password reset settings based on the specific user types. |
|||
| |
|||
| The expire time is the number of minutes that the reset token should be |
|||
| considered valid. This security feature keeps tokens short-lived so |
|||
| they have less time to be guessed. You may change this as needed. |
|||
| |
|||
*/ |
|||
|
|||
'passwords' => [ |
|||
'users' => [ |
|||
'provider' => 'users', |
|||
'table' => 'password_resets', |
|||
'expire' => 60, |
|||
'throttle' => 60, |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Password Confirmation Timeout |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define the amount of seconds before a password confirmation |
|||
| times out and the user is prompted to re-enter their password via the |
|||
| confirmation screen. By default, the timeout lasts for three hours. |
|||
| |
|||
*/ |
|||
|
|||
'password_timeout' => 10800, |
|||
|
|||
]; |
@ -0,0 +1,64 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Broadcaster |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default broadcaster that will be used by the |
|||
| framework when an event needs to be broadcast. You may set this to |
|||
| any of the connections defined in the "connections" array below. |
|||
| |
|||
| Supported: "pusher", "redis", "log", "null" |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('BROADCAST_DRIVER', 'null'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Broadcast Connections |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define all of the broadcast connections that will be used |
|||
| to broadcast events to other systems or over websockets. Samples of |
|||
| each available type of connection are provided inside this array. |
|||
| |
|||
*/ |
|||
|
|||
'connections' => [ |
|||
|
|||
'pusher' => [ |
|||
'driver' => 'pusher', |
|||
'key' => env('PUSHER_APP_KEY'), |
|||
'secret' => env('PUSHER_APP_SECRET'), |
|||
'app_id' => env('PUSHER_APP_ID'), |
|||
'options' => [ |
|||
'cluster' => env('PUSHER_APP_CLUSTER'), |
|||
'useTLS' => true, |
|||
], |
|||
], |
|||
|
|||
'ably' => [ |
|||
'driver' => 'ably', |
|||
'key' => env('ABLY_KEY'), |
|||
], |
|||
|
|||
'redis' => [ |
|||
'driver' => 'redis', |
|||
'connection' => 'default', |
|||
], |
|||
|
|||
'log' => [ |
|||
'driver' => 'log', |
|||
], |
|||
|
|||
'null' => [ |
|||
'driver' => 'null', |
|||
], |
|||
|
|||
], |
|||
|
|||
]; |
@ -0,0 +1,104 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Str; |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Cache Store |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default cache connection that gets used while |
|||
| using this caching library. This connection is used when another is |
|||
| not explicitly specified when executing a given caching function. |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('CACHE_DRIVER', 'file'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Stores |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define all of the cache "stores" for your application as |
|||
| well as their drivers. You may even define multiple stores for the |
|||
| same cache driver to group types of items stored in your caches. |
|||
| |
|||
| Supported drivers: "apc", "array", "database", "file", |
|||
| "memcached", "redis", "dynamodb", "null" |
|||
| |
|||
*/ |
|||
|
|||
'stores' => [ |
|||
|
|||
'apc' => [ |
|||
'driver' => 'apc', |
|||
], |
|||
|
|||
'array' => [ |
|||
'driver' => 'array', |
|||
'serialize' => false, |
|||
], |
|||
|
|||
'database' => [ |
|||
'driver' => 'database', |
|||
'table' => 'cache', |
|||
'connection' => null, |
|||
], |
|||
|
|||
'file' => [ |
|||
'driver' => 'file', |
|||
'path' => storage_path('framework/cache/data'), |
|||
], |
|||
|
|||
'memcached' => [ |
|||
'driver' => 'memcached', |
|||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), |
|||
'sasl' => [ |
|||
env('MEMCACHED_USERNAME'), |
|||
env('MEMCACHED_PASSWORD'), |
|||
], |
|||
'options' => [ |
|||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
|||
], |
|||
'servers' => [ |
|||
[ |
|||
'host' => env('MEMCACHED_HOST', '127.0.0.1'), |
|||
'port' => env('MEMCACHED_PORT', 11211), |
|||
'weight' => 100, |
|||
], |
|||
], |
|||
], |
|||
|
|||
'redis' => [ |
|||
'driver' => 'redis', |
|||
'connection' => 'cache', |
|||
], |
|||
|
|||
'dynamodb' => [ |
|||
'driver' => 'dynamodb', |
|||
'key' => env('AWS_ACCESS_KEY_ID'), |
|||
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
|||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
|||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), |
|||
'endpoint' => env('DYNAMODB_ENDPOINT'), |
|||
], |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Key Prefix |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When utilizing a RAM based store such as APC or Memcached, there might |
|||
| be other applications utilizing the same cache. So, we'll specify a |
|||
| value to get prefixed to all our keys so we can avoid collisions. |
|||
| |
|||
*/ |
|||
|
|||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), |
|||
|
|||
]; |
@ -0,0 +1,34 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cross-Origin Resource Sharing (CORS) Configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure your settings for cross-origin resource sharing |
|||
| or "CORS". This determines what cross-origin operations may execute |
|||
| in web browsers. You are free to adjust these settings as needed. |
|||
| |
|||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS |
|||
| |
|||
*/ |
|||
|
|||
'paths' => ['api/*', 'sanctum/csrf-cookie'], |
|||
|
|||
'allowed_methods' => ['*'], |
|||
|
|||
'allowed_origins' => ['*'], |
|||
|
|||
'allowed_origins_patterns' => [], |
|||
|
|||
'allowed_headers' => ['*'], |
|||
|
|||
'exposed_headers' => [], |
|||
|
|||
'max_age' => 0, |
|||
|
|||
'supports_credentials' => false, |
|||
|
|||
]; |
@ -0,0 +1,147 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Str; |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Database Connection Name |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify which of the database connections below you wish |
|||
| to use as your default connection for all database work. Of course |
|||
| you may use many connections at once using the Database library. |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('DB_CONNECTION', 'mysql'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Database Connections |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here are each of the database connections setup for your application. |
|||
| Of course, examples of configuring each database platform that is |
|||
| supported by Laravel is shown below to make development simple. |
|||
| |
|||
| |
|||
| All database work in Laravel is done through the PHP PDO facilities |
|||
| so make sure you have the driver for your particular database of |
|||
| choice installed on your machine before you begin development. |
|||
| |
|||
*/ |
|||
|
|||
'connections' => [ |
|||
|
|||
'sqlite' => [ |
|||
'driver' => 'sqlite', |
|||
'url' => env('DATABASE_URL'), |
|||
'database' => env('DB_DATABASE', database_path('database.sqlite')), |
|||
'prefix' => '', |
|||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), |
|||
], |
|||
|
|||
'mysql' => [ |
|||
'driver' => 'mysql', |
|||
'url' => env('DATABASE_URL'), |
|||
'host' => env('DB_HOST', '127.0.0.1'), |
|||
'port' => env('DB_PORT', '3306'), |
|||
'database' => env('DB_DATABASE', 'forge'), |
|||
'username' => env('DB_USERNAME', 'forge'), |
|||
'password' => env('DB_PASSWORD', ''), |
|||
'unix_socket' => env('DB_SOCKET', ''), |
|||
'charset' => 'utf8mb4', |
|||
'collation' => 'utf8mb4_unicode_ci', |
|||
'prefix' => '', |
|||
'prefix_indexes' => true, |
|||
'strict' => false, |
|||
'engine' => null, |
|||
'options' => extension_loaded('pdo_mysql') ? array_filter([ |
|||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), |
|||
]) : [], |
|||
], |
|||
|
|||
'pgsql' => [ |
|||
'driver' => 'pgsql', |
|||
'url' => env('DATABASE_URL'), |
|||
'host' => env('DB_HOST', '127.0.0.1'), |
|||
'port' => env('DB_PORT', '5432'), |
|||
'database' => env('DB_DATABASE', 'forge'), |
|||
'username' => env('DB_USERNAME', 'forge'), |
|||
'password' => env('DB_PASSWORD', ''), |
|||
'charset' => 'utf8', |
|||
'prefix' => '', |
|||
'prefix_indexes' => true, |
|||
'schema' => 'public', |
|||
'sslmode' => 'prefer', |
|||
], |
|||
|
|||
'sqlsrv' => [ |
|||
'driver' => 'sqlsrv', |
|||
'url' => env('DATABASE_URL'), |
|||
'host' => env('DB_HOST', 'localhost'), |
|||
'port' => env('DB_PORT', '1433'), |
|||
'database' => env('DB_DATABASE', 'forge'), |
|||
'username' => env('DB_USERNAME', 'forge'), |
|||
'password' => env('DB_PASSWORD', ''), |
|||
'charset' => 'utf8', |
|||
'prefix' => '', |
|||
'prefix_indexes' => true, |
|||
], |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Migration Repository Table |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This table keeps track of all the migrations that have already run for |
|||
| your application. Using this information, we can determine which of |
|||
| the migrations on disk haven't actually been run in the database. |
|||
| |
|||
*/ |
|||
|
|||
'migrations' => 'migrations', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Redis Databases |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Redis is an open source, fast, and advanced key-value store that also |
|||
| provides a richer body of commands than a typical key-value system |
|||
| such as APC or Memcached. Laravel makes it easy to dig right in. |
|||
| |
|||
*/ |
|||
|
|||
'redis' => [ |
|||
|
|||
'client' => env('REDIS_CLIENT', 'phpredis'), |
|||
|
|||
'options' => [ |
|||
'cluster' => env('REDIS_CLUSTER', 'redis'), |
|||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'), |
|||
], |
|||
|
|||
'default' => [ |
|||
'url' => env('REDIS_URL'), |
|||
'host' => env('REDIS_HOST', '127.0.0.1'), |
|||
'password' => env('REDIS_PASSWORD', null), |
|||
'port' => env('REDIS_PORT', '6379'), |
|||
'database' => env('REDIS_DB', '0'), |
|||
], |
|||
|
|||
'cache' => [ |
|||
'url' => env('REDIS_URL'), |
|||
'host' => env('REDIS_HOST', '127.0.0.1'), |
|||
'password' => env('REDIS_PASSWORD', null), |
|||
'port' => env('REDIS_PORT', '6379'), |
|||
'database' => env('REDIS_CACHE_DB', '1'), |
|||
], |
|||
|
|||
], |
|||
|
|||
]; |
@ -0,0 +1,73 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Filesystem Disk |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify the default filesystem disk that should be used |
|||
| by the framework. The "local" disk, as well as a variety of cloud |
|||
| based disks are available to your application. Just store away! |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('FILESYSTEM_DISK', 'local'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Filesystem Disks |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure as many filesystem "disks" as you wish, and you |
|||
| may even configure multiple disks of the same driver. Defaults have |
|||
| been setup for each driver as an example of the required options. |
|||
| |
|||
| Supported Drivers: "local", "ftp", "sftp", "s3" |
|||
| |
|||
*/ |
|||
|
|||
'disks' => [ |
|||
|
|||
'local' => [ |
|||
'driver' => 'local', |
|||
'root' => storage_path('app'), |
|||
], |
|||
|
|||
'public' => [ |
|||
'driver' => 'local', |
|||
'root' => storage_path('app/public'), |
|||
'url' => env('APP_URL') . '/storage', |
|||
'visibility' => 'public', |
|||
], |
|||
|
|||
's3' => [ |
|||
'driver' => 's3', |
|||
'key' => env('AWS_ACCESS_KEY_ID'), |
|||
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
|||
'region' => env('AWS_DEFAULT_REGION'), |
|||
'bucket' => env('AWS_BUCKET'), |
|||
'url' => env('AWS_URL'), |
|||
'endpoint' => env('AWS_ENDPOINT'), |
|||
'visibility' => 'public', |
|||
], |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Symbolic Links |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure the symbolic links that will be created when the |
|||
| `storage:link` Artisan command is executed. The array keys should be |
|||
| the locations of the links and the values should be their targets. |
|||
| |
|||
*/ |
|||
|
|||
'links' => [ |
|||
public_path('storage') => storage_path('app/public'), |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,31 @@ |
|||
<?php |
|||
|
|||
/* |
|||
* This file is part of the Laravel Rave package. |
|||
* |
|||
* (c) Oluwole Adebiyi - Flamez <flamekeed@gmail.com> |
|||
* |
|||
* For the full copyright and license information, please view the LICENSE |
|||
* file that was distributed with this source code. |
|||
*/ |
|||
|
|||
return [ |
|||
|
|||
/** |
|||
* Public Key: Your Rave publicKey. Sign up on https://dashboard.flutterwave.com/ to get one from your settings page |
|||
* |
|||
*/ |
|||
'publicKey' => env('FLW_PUBLIC_KEY'), |
|||
|
|||
/** |
|||
* Secret Key: Your Rave secretKey. Sign up on https://dashboard.flutterwave.com/ to get one from your settings page |
|||
* |
|||
*/ |
|||
'secretKey' => env('FLW_SECRET_KEY'), |
|||
|
|||
/** |
|||
* Prefix: Secret hash for webhook |
|||
* |
|||
*/ |
|||
'secretHash' => env('FLW_SECRET_HASH', ''), |
|||
]; |
@ -0,0 +1,52 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Hash Driver |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default hash driver that will be used to hash |
|||
| passwords for your application. By default, the bcrypt algorithm is |
|||
| used; however, you remain free to modify this option if you wish. |
|||
| |
|||
| Supported: "bcrypt", "argon", "argon2id" |
|||
| |
|||
*/ |
|||
|
|||
'driver' => 'bcrypt', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Bcrypt Options |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify the configuration options that should be used when |
|||
| passwords are hashed using the Bcrypt algorithm. This will allow you |
|||
| to control the amount of time it takes to hash the given password. |
|||
| |
|||
*/ |
|||
|
|||
'bcrypt' => [ |
|||
'rounds' => env('BCRYPT_ROUNDS', 10), |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Argon Options |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify the configuration options that should be used when |
|||
| passwords are hashed using the Argon algorithm. These will allow you |
|||
| to control the amount of time it takes to hash the given password. |
|||
| |
|||
*/ |
|||
|
|||
'argon' => [ |
|||
'memory' => 1024, |
|||
'threads' => 2, |
|||
'time' => 2, |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,104 @@ |
|||
<?php |
|||
|
|||
use Monolog\Handler\NullHandler; |
|||
use Monolog\Handler\StreamHandler; |
|||
use Monolog\Handler\SyslogUdpHandler; |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Log Channel |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option defines the default log channel that gets used when writing |
|||
| messages to the logs. The name specified in this option should match |
|||
| one of the channels defined in the "channels" configuration array. |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('LOG_CHANNEL', 'stack'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Log Channels |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure the log channels for your application. Out of |
|||
| the box, Laravel uses the Monolog PHP logging library. This gives |
|||
| you a variety of powerful log handlers / formatters to utilize. |
|||
| |
|||
| Available Drivers: "single", "daily", "slack", "syslog", |
|||
| "errorlog", "monolog", |
|||
| "custom", "stack" |
|||
| |
|||
*/ |
|||
|
|||
'channels' => [ |
|||
'stack' => [ |
|||
'driver' => 'stack', |
|||
'channels' => ['single'], |
|||
'ignore_exceptions' => false, |
|||
], |
|||
|
|||
'single' => [ |
|||
'driver' => 'single', |
|||
'path' => storage_path('logs/laravel.log'), |
|||
'level' => env('LOG_LEVEL', 'debug'), |
|||
], |
|||
|
|||
'daily' => [ |
|||
'driver' => 'daily', |
|||
'path' => storage_path('logs/laravel.log'), |
|||
'level' => env('LOG_LEVEL', 'debug'), |
|||
'days' => 14, |
|||
], |
|||
|
|||
'slack' => [ |
|||
'driver' => 'slack', |
|||
'url' => env('LOG_SLACK_WEBHOOK_URL'), |
|||
'username' => 'Laravel Log', |
|||
'emoji' => ':boom:', |
|||
'level' => env('LOG_LEVEL', 'critical'), |
|||
], |
|||
|
|||
'papertrail' => [ |
|||
'driver' => 'monolog', |
|||
'level' => env('LOG_LEVEL', 'debug'), |
|||
'handler' => SyslogUdpHandler::class, |
|||
'handler_with' => [ |
|||
'host' => env('PAPERTRAIL_URL'), |
|||
'port' => env('PAPERTRAIL_PORT'), |
|||
], |
|||
], |
|||
|
|||
'stderr' => [ |
|||
'driver' => 'monolog', |
|||
'handler' => StreamHandler::class, |
|||
'formatter' => env('LOG_STDERR_FORMATTER'), |
|||
'with' => [ |
|||
'stream' => 'php://stderr', |
|||
], |
|||
], |
|||
|
|||
'syslog' => [ |
|||
'driver' => 'syslog', |
|||
'level' => env('LOG_LEVEL', 'debug'), |
|||
], |
|||
|
|||
'errorlog' => [ |
|||
'driver' => 'errorlog', |
|||
'level' => env('LOG_LEVEL', 'debug'), |
|||
], |
|||
|
|||
'null' => [ |
|||
'driver' => 'monolog', |
|||
'handler' => NullHandler::class, |
|||
], |
|||
|
|||
'emergency' => [ |
|||
'path' => storage_path('logs/laravel.log'), |
|||
], |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,110 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Mailer |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default mailer that is used to send any email |
|||
| messages sent by your application. Alternative mailers may be setup |
|||
| and used as needed; however, this mailer will be used by default. |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('MAIL_MAILER', 'smtp'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Mailer Configurations |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure all of the mailers used by your application plus |
|||
| their respective settings. Several examples have been configured for |
|||
| you and you are free to add your own as your application requires. |
|||
| |
|||
| Laravel supports a variety of mail "transport" drivers to be used while |
|||
| sending an e-mail. You will specify which one you are using for your |
|||
| mailers below. You are free to add additional mailers as required. |
|||
| |
|||
| Supported: "smtp", "sendmail", "mailgun", "ses", |
|||
| "postmark", "log", "array" |
|||
| |
|||
*/ |
|||
|
|||
'mailers' => [ |
|||
'smtp' => [ |
|||
'transport' => 'smtp', |
|||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), |
|||
'port' => env('MAIL_PORT', 587), |
|||
'encryption' => env('MAIL_ENCRYPTION', 'tls'), |
|||
'username' => env('MAIL_USERNAME'), |
|||
'password' => env('MAIL_PASSWORD'), |
|||
'timeout' => null, |
|||
'auth_mode' => null, |
|||
], |
|||
|
|||
'ses' => [ |
|||
'transport' => 'ses', |
|||
], |
|||
|
|||
'mailgun' => [ |
|||
'transport' => 'mailgun', |
|||
], |
|||
|
|||
'postmark' => [ |
|||
'transport' => 'postmark', |
|||
], |
|||
|
|||
'sendmail' => [ |
|||
'transport' => 'sendmail', |
|||
'path' => '/usr/sbin/sendmail -bs', |
|||
], |
|||
|
|||
'log' => [ |
|||
'transport' => 'log', |
|||
'channel' => env('MAIL_LOG_CHANNEL'), |
|||
], |
|||
|
|||
'array' => [ |
|||
'transport' => 'array', |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Global "From" Address |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| You may wish for all e-mails sent by your application to be sent from |
|||
| the same address. Here, you may specify a name and address that is |
|||
| used globally for all e-mails that are sent by your application. |
|||
| |
|||
*/ |
|||
|
|||
'from' => [ |
|||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), |
|||
'name' => env('MAIL_FROM_NAME', 'Example'), |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Markdown Mail Settings |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If you are using Markdown based email rendering, you may configure your |
|||
| theme and component paths here, allowing you to customize the design |
|||
| of the emails. Or, you may simply stick with the Laravel defaults! |
|||
| |
|||
*/ |
|||
|
|||
'markdown' => [ |
|||
'theme' => 'default', |
|||
|
|||
'paths' => [ |
|||
resource_path('views/vendor/mail'), |
|||
], |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,21 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Laravel money |
|||
|-------------------------------------------------------------------------- |
|||
*/ |
|||
'locale' => config('app.locale', 'en_US'), |
|||
'defaultCurrency' => config('app.currency', 'USD'), |
|||
'defaultFormatter' => null, |
|||
'isoCurrenciesPath' => __DIR__.'/../vendor/moneyphp/money/resources/currency.php', |
|||
'currencies' => [ |
|||
'iso' => 'all', |
|||
'bitcoin' => 'all', |
|||
'custom' => [ |
|||
// 'MY1' => 2,
|
|||
// 'MY2' => 3
|
|||
], |
|||
], |
|||
]; |
@ -0,0 +1,26 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
'mode' => 'utf-8', |
|||
'format' => 'A4', |
|||
'author' => '', |
|||
'subject' => '', |
|||
'keywords' => '', |
|||
'creator' => 'Laravel Pdf', |
|||
'display_mode' => 'fullpage', |
|||
'tempDir' => storage_path('app/temp'), // base_path(storage_path('app/public')),
|
|||
'pdf_a' => false, |
|||
'pdf_a_auto' => false, |
|||
'icc_profile_path' => '', |
|||
'font_path' => base_path('resources/fonts/'), |
|||
'font_data' => [ |
|||
'bangla' => [ |
|||
'R' => 'SolaimanLipi.ttf', // regular font
|
|||
'B' => 'SolaimanLipi.ttf', // optional: bold font
|
|||
'I' => 'SolaimanLipi.ttf', // optional: italic font
|
|||
'BI' => 'SolaimanLipi.ttf', // optional: bold-italic font
|
|||
'useOTL' => 0xFF, |
|||
'useKashida' => 75, |
|||
] |
|||
], |
|||
]; |
@ -0,0 +1,86 @@ |
|||
<?php |
|||
|
|||
use Stevebauman\Purify\Definitions\Html5Definition; |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Config |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option defines the default config that are provided to HTMLPurifier. |
|||
| |
|||
*/ |
|||
|
|||
'default' => 'default', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Config sets |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure various sets of configuration for differentiated use of HTMLPurifier. |
|||
| A specific set of configuration can be applied by calling the "config($name)" method on |
|||
| a Purify instance. Feel free to add/remove/customize these attributes as you wish. |
|||
| |
|||
| Documentation: http://htmlpurifier.org/live/configdoc/plain.html |
|||
| |
|||
| Core.Encoding The encoding to convert input to. |
|||
| HTML.Doctype Doctype to use during filtering. |
|||
| HTML.Allowed The allowed HTML Elements with their allowed attributes. |
|||
| HTML.ForbiddenElements The forbidden HTML elements. Elements that are listed in this |
|||
| string will be removed, however their content will remain. |
|||
| CSS.AllowedProperties The Allowed CSS properties. |
|||
| AutoFormat.AutoParagraph Newlines are converted in to paragraphs whenever possible. |
|||
| AutoFormat.RemoveEmpty Remove empty elements that contribute no semantic information to the document. |
|||
| |
|||
*/ |
|||
|
|||
'configs' => [ |
|||
|
|||
'default' => [ |
|||
'Core.Encoding' => 'utf-8', |
|||
'HTML.Doctype' => 'HTML 4.01 Transitional', |
|||
'HTML.Allowed' => 'h1,h2,h3,h4,h5,h6,b,strong,i,em,s,del,a[href|title],ul,ol,li,p[style],br,span,img[width|height|alt|src]', |
|||
'HTML.ForbiddenElements' => '', |
|||
'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', |
|||
'AutoFormat.AutoParagraph' => false, |
|||
'AutoFormat.RemoveEmpty' => false, |
|||
], |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| HTMLPurifier definitions |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify a class that augments the HTML definitions used by |
|||
| HTMLPurifier. Additional HTML5 definitions are provided out of the box. |
|||
| When specifying a custom class, make sure it implements the interface: |
|||
| |
|||
| \Stevebauman\Purify\Definitions\Definition |
|||
| |
|||
| Note that these definitions are applied to every Purifier instance. |
|||
| |
|||
| Documentation: http://htmlpurifier.org/docs/enduser-customize.html |
|||
| |
|||
*/ |
|||
|
|||
'definitions' => Html5Definition::class, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Serializer location |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The location where HTMLPurifier can store its temporary serializer files. |
|||
| The filepath should be accessible and writable by the web server. |
|||
| A good place for this is in the framework's own storage path. |
|||
| |
|||
*/ |
|||
|
|||
'serializer' => storage_path('app/purify'), |
|||
|
|||
]; |
@ -0,0 +1,89 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Queue Connection Name |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Laravel's queue API supports an assortment of back-ends via a single |
|||
| API, giving you convenient access to each back-end using the same |
|||
| syntax for every one. Here you may define a default connection. |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('QUEUE_CONNECTION', 'sync'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Queue Connections |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure the connection information for each server that |
|||
| is used by your application. A default configuration has been added |
|||
| for each back-end shipped with Laravel. You are free to add more. |
|||
| |
|||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" |
|||
| |
|||
*/ |
|||
|
|||
'connections' => [ |
|||
|
|||
'sync' => [ |
|||
'driver' => 'sync', |
|||
], |
|||
|
|||
'database' => [ |
|||
'driver' => 'database', |
|||
'table' => 'jobs', |
|||
'queue' => 'default', |
|||
'retry_after' => 90, |
|||
], |
|||
|
|||
'beanstalkd' => [ |
|||
'driver' => 'beanstalkd', |
|||
'host' => 'localhost', |
|||
'queue' => 'default', |
|||
'retry_after' => 90, |
|||
'block_for' => 0, |
|||
], |
|||
|
|||
'sqs' => [ |
|||
'driver' => 'sqs', |
|||
'key' => env('AWS_ACCESS_KEY_ID'), |
|||
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
|||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), |
|||
'queue' => env('SQS_QUEUE', 'your-queue-name'), |
|||
'suffix' => env('SQS_SUFFIX'), |
|||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
|||
], |
|||
|
|||
'redis' => [ |
|||
'driver' => 'redis', |
|||
'connection' => 'default', |
|||
'queue' => env('REDIS_QUEUE', 'default'), |
|||
'retry_after' => 90, |
|||
'block_for' => null, |
|||
], |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Failed Queue Jobs |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| These options configure the behavior of failed queue job logging so you |
|||
| can control which database and table are used to store the jobs that |
|||
| have failed. You may change them to any database / table you wish. |
|||
| |
|||
*/ |
|||
|
|||
'failed' => [ |
|||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), |
|||
'database' => env('DB_CONNECTION', 'mysql'), |
|||
'table' => 'failed_jobs', |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,33 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Third Party Services |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This file is for storing the credentials for third party services such |
|||
| as Mailgun, Postmark, AWS and more. This file provides the de facto |
|||
| location for this type of information, allowing packages to have |
|||
| a conventional file to locate the various service credentials. |
|||
| |
|||
*/ |
|||
|
|||
'mailgun' => [ |
|||
'domain' => env('MAILGUN_DOMAIN'), |
|||
'secret' => env('MAILGUN_SECRET'), |
|||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), |
|||
], |
|||
|
|||
'postmark' => [ |
|||
'token' => env('POSTMARK_TOKEN'), |
|||
], |
|||
|
|||
'ses' => [ |
|||
'key' => env('AWS_ACCESS_KEY_ID'), |
|||
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
|||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,201 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Str; |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Session Driver |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default session "driver" that will be used on |
|||
| requests. By default, we will use the lightweight native driver but |
|||
| you may specify any of the other wonderful drivers provided here. |
|||
| |
|||
| Supported: "file", "cookie", "database", "apc", |
|||
| "memcached", "redis", "dynamodb", "array" |
|||
| |
|||
*/ |
|||
|
|||
'driver' => env('SESSION_DRIVER', 'file'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Lifetime |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify the number of minutes that you wish the session |
|||
| to be allowed to remain idle before it expires. If you want them |
|||
| to immediately expire on the browser closing, set that option. |
|||
| |
|||
*/ |
|||
|
|||
'lifetime' => env('SESSION_LIFETIME', 120), |
|||
|
|||
'expire_on_close' => false, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Encryption |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option allows you to easily specify that all of your session data |
|||
| should be encrypted before it is stored. All encryption will be run |
|||
| automatically by Laravel and you can use the Session like normal. |
|||
| |
|||
*/ |
|||
|
|||
'encrypt' => false, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session File Location |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When using the native session driver, we need a location where session |
|||
| files may be stored. A default has been set for you but a different |
|||
| location may be specified. This is only needed for file sessions. |
|||
| |
|||
*/ |
|||
|
|||
'files' => storage_path('framework/sessions'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Database Connection |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When using the "database" or "redis" session drivers, you may specify a |
|||
| connection that should be used to manage these sessions. This should |
|||
| correspond to a connection in your database configuration options. |
|||
| |
|||
*/ |
|||
|
|||
'connection' => env('SESSION_CONNECTION', null), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Database Table |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When using the "database" session driver, you may specify the table we |
|||
| should use to manage the sessions. Of course, a sensible default is |
|||
| provided for you; however, you are free to change this as needed. |
|||
| |
|||
*/ |
|||
|
|||
'table' => 'sessions', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Cache Store |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| While using one of the framework's cache driven session backends you may |
|||
| list a cache store that should be used for these sessions. This value |
|||
| must match with one of the application's configured cache "stores". |
|||
| |
|||
| Affects: "apc", "dynamodb", "memcached", "redis" |
|||
| |
|||
*/ |
|||
|
|||
'store' => env('SESSION_STORE', null), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Sweeping Lottery |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Some session drivers must manually sweep their storage location to get |
|||
| rid of old sessions from storage. Here are the chances that it will |
|||
| happen on a given request. By default, the odds are 2 out of 100. |
|||
| |
|||
*/ |
|||
|
|||
'lottery' => [2, 100], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Cookie Name |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may change the name of the cookie used to identify a session |
|||
| instance by ID. The name specified here will get used every time a |
|||
| new session cookie is created by the framework for every driver. |
|||
| |
|||
*/ |
|||
|
|||
'cookie' => env( |
|||
'SESSION_COOKIE', |
|||
Str::slug(env('APP_NAME', 'laravel'), '_').'_session' |
|||
), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Cookie Path |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The session cookie path determines the path for which the cookie will |
|||
| be regarded as available. Typically, this will be the root path of |
|||
| your application but you are free to change this when necessary. |
|||
| |
|||
*/ |
|||
|
|||
'path' => '/', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Session Cookie Domain |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may change the domain of the cookie used to identify a session |
|||
| in your application. This will determine which domains the cookie is |
|||
| available to in your application. A sensible default has been set. |
|||
| |
|||
*/ |
|||
|
|||
'domain' => env('SESSION_DOMAIN', null), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| HTTPS Only Cookies |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| By setting this option to true, session cookies will only be sent back |
|||
| to the server if the browser has a HTTPS connection. This will keep |
|||
| the cookie from being sent to you if it can not be done securely. |
|||
| |
|||
*/ |
|||
|
|||
'secure' => env('SESSION_SECURE_COOKIE'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| HTTP Access Only |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Setting this value to true will prevent JavaScript from accessing the |
|||
| value of the cookie and the cookie will only be accessible through |
|||
| the HTTP protocol. You are free to modify this option if needed. |
|||
| |
|||
*/ |
|||
|
|||
'http_only' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Same-Site Cookies |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option determines how your cookies behave when cross-site requests |
|||
| take place, and can be used to mitigate CSRF attacks. By default, we |
|||
| will set this value to "lax" since this is a secure default value. |
|||
| |
|||
| Supported: "lax", "strict", "none", null |
|||
| |
|||
*/ |
|||
|
|||
'same_site' => 'lax', |
|||
|
|||
]; |
@ -0,0 +1,141 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/** |
|||
* What attributes do we use to build the slug? |
|||
* This can be a single field, like "name" which will build a slug from: |
|||
* |
|||
* $model->name; |
|||
* |
|||
* Or it can be an array of fields, like ["name", "company"], which builds a slug from: |
|||
* |
|||
* $model->name . ' ' . $model->company; |
|||
* |
|||
* If you've defined custom getters in your model, you can use those too, |
|||
* since Eloquent will call them when you request a custom attribute. |
|||
* |
|||
* Defaults to null, which uses the toString() method on your model. |
|||
*/ |
|||
|
|||
'source' => null, |
|||
|
|||
/** |
|||
* The maximum length of a generated slug. Defaults to "null", which means |
|||
* no length restrictions are enforced. Set it to a positive integer if you |
|||
* want to make sure your slugs aren't too long. |
|||
*/ |
|||
|
|||
'maxLength' => null, |
|||
|
|||
/** |
|||
* If you are setting a maximum length on your slugs, you may not want the |
|||
* truncated string to split a word in half. The default setting of "true" |
|||
* will ensure this, e.g. with a maxLength of 12: |
|||
* |
|||
* "my source string" -> "my-source" |
|||
* |
|||
* Setting it to "false" will simply truncate the generated slug at the |
|||
* desired length, e.g.: |
|||
* |
|||
* "my source string" -> "my-source-st" |
|||
*/ |
|||
|
|||
'maxLengthKeepWords' => true, |
|||
|
|||
/** |
|||
* If left to "null", then use the cocur/slugify package to generate the slug |
|||
* (with the separator defined below). |
|||
* |
|||
* Set this to a closure that accepts two parameters (string and separator) |
|||
* to define a custom slugger. e.g.: |
|||
* |
|||
* 'method' => function( $string, $sep ) { |
|||
* return preg_replace('/[^a-z]+/i', $sep, $string); |
|||
* }, |
|||
* |
|||
* Otherwise, this will be treated as a callable to be used. e.g.: |
|||
* |
|||
* 'method' => array('Str','slug'), |
|||
*/ |
|||
|
|||
'method' => null, |
|||
|
|||
/** |
|||
* Separator to use when generating slugs. Defaults to a hyphen. |
|||
*/ |
|||
|
|||
'separator' => '-', |
|||
|
|||
/** |
|||
* Enforce uniqueness of slugs? Defaults to true. |
|||
* If a generated slug already exists, an incremental numeric |
|||
* value will be appended to the end until a unique slug is found. e.g.: |
|||
* |
|||
* my-slug |
|||
* my-slug-1 |
|||
* my-slug-2 |
|||
*/ |
|||
|
|||
'unique' => true, |
|||
|
|||
/** |
|||
* If you are enforcing unique slugs, the default is to add an |
|||
* incremental value to the end of the base slug. Alternatively, you |
|||
* can change this value to a closure that accepts three parameters: |
|||
* the base slug, the separator, and a Collection of the other |
|||
* "similar" slugs. The closure should return the new unique |
|||
* suffix to append to the slug. |
|||
*/ |
|||
|
|||
'uniqueSuffix' => null, |
|||
|
|||
/** |
|||
* Should we include the trashed items when generating a unique slug? |
|||
* This only applies if the softDelete property is set for the Eloquent model. |
|||
* If set to "false", then a new slug could duplicate one that exists on a trashed model. |
|||
* If set to "true", then uniqueness is enforced across trashed and existing models. |
|||
*/ |
|||
|
|||
'includeTrashed' => false, |
|||
|
|||
/** |
|||
* An array of slug names that can never be used for this model, |
|||
* e.g. to prevent collisions with existing routes or controller methods, etc.. |
|||
* Defaults to null (i.e. no reserved names). |
|||
* Can be a static array, e.g.: |
|||
* |
|||
* 'reserved' => array('add', 'delete'), |
|||
* |
|||
* or a closure that returns an array of reserved names. |
|||
* If using a closure, it will accept one parameter: the model itself, and should |
|||
* return an array of reserved names, or null. e.g. |
|||
* |
|||
* 'reserved' => function( Model $model) { |
|||
* return $model->some_method_that_returns_an_array(); |
|||
* } |
|||
* |
|||
* In the case of a slug that gets generated with one of these reserved names, |
|||
* we will do: |
|||
* |
|||
* $slug .= $separator + "1" |
|||
* |
|||
* and continue from there. |
|||
*/ |
|||
|
|||
'reserved' => null, |
|||
|
|||
/** |
|||
* Whether to update the slug value when a model is being |
|||
* re-saved (i.e. already exists). Defaults to false, which |
|||
* means slugs are not updated. |
|||
* |
|||
* Be careful! If you are using slugs to generate URLs, then |
|||
* updating your slug automatically might change your URLs which |
|||
* is probably not a good idea from an SEO point of view. |
|||
* Only set this to true if you understand the possible consequences. |
|||
*/ |
|||
|
|||
'onUpdate' => true, |
|||
|
|||
]; |
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| View Storage Paths |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Most templating systems load templates from disk. Here you may specify |
|||
| an array of paths that should be checked for your views. Of course |
|||
| the usual Laravel view path has already been registered for you. |
|||
| |
|||
*/ |
|||
|
|||
'paths' => [ |
|||
resource_path('views'), |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Compiled View Path |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option determines where all the compiled Blade templates will be |
|||
| stored for your application. Typically, this is within the storage |
|||
| directory. However, as usual, you are free to change this value. |
|||
| |
|||
*/ |
|||
|
|||
'compiled' => env( |
|||
'VIEW_COMPILED_PATH', |
|||
realpath(storage_path('framework/views')) |
|||
), |
|||
|
|||
]; |
@ -0,0 +1,2 @@ |
|||
*.sqlite |
|||
*.sqlite-journal |
@ -0,0 +1,33 @@ |
|||
<?php |
|||
|
|||
namespace Database\Factories; |
|||
|
|||
use App\Models\User; |
|||
use Illuminate\Database\Eloquent\Factories\Factory; |
|||
use Illuminate\Support\Str; |
|||
|
|||
class UserFactory extends Factory |
|||
{ |
|||
/** |
|||
* The name of the factory's corresponding model. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $model = User::class; |
|||
|
|||
/** |
|||
* Define the model's default state. |
|||
* |
|||
* @return array |
|||
*/ |
|||
public function definition() |
|||
{ |
|||
return [ |
|||
'name' => $this->faker->name, |
|||
'email' => $this->faker->unique()->safeEmail, |
|||
'email_verified_at' => now(), |
|||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
|||
'remember_token' => Str::random(10), |
|||
]; |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateUsersTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('users', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->string('email')->unique(); |
|||
$table->timestamp('email_verified_at')->nullable(); |
|||
$table->string('password'); |
|||
$table->rememberToken(); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('users'); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreatePasswordResetsTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('password_resets', function (Blueprint $table) { |
|||
$table->string('email')->index(); |
|||
$table->string('token'); |
|||
$table->timestamp('created_at')->nullable(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('password_resets'); |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateFailedJobsTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('failed_jobs', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('uuid')->unique(); |
|||
$table->text('connection'); |
|||
$table->text('queue'); |
|||
$table->longText('payload'); |
|||
$table->longText('exception'); |
|||
$table->timestamp('failed_at')->useCurrent(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('failed_jobs'); |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateJobsTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('jobs', function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->string('queue')->index(); |
|||
$table->longText('payload'); |
|||
$table->unsignedTinyInteger('attempts'); |
|||
$table->unsignedInteger('reserved_at')->nullable(); |
|||
$table->unsignedInteger('available_at'); |
|||
$table->unsignedInteger('created_at'); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('jobs'); |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Seeder; |
|||
use Illuminate\Support\Facades\DB; |
|||
use Marvel\Database\Models\Attribute; |
|||
use Marvel\Database\Models\AttributeValue; |
|||
use Marvel\Database\Models\Product; |
|||
use Marvel\Database\Models\User; |
|||
use Marvel\Database\Models\Category; |
|||
use Marvel\Database\Models\Type; |
|||
use Marvel\Database\Models\Order; |
|||
use Marvel\Database\Models\OrderStatus; |
|||
use Marvel\Database\Models\Coupon; |
|||
use Spatie\Permission\Models\Permission; |
|||
use Marvel\Enums\Permission as UserPermission; |
|||
|
|||
|
|||
class DatabaseSeeder extends Seeder |
|||
{ |
|||
/** |
|||
* Seed the application's database. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function run() |
|||
{ |
|||
// run your app seeder
|
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
#!/bin/sh |
|||
FILE=.env |
|||
if [ ! -f "$FILE" ]; then |
|||
echo 'Creating .env file...' |
|||
cp .env.example .env |
|||
fi |
|||
|
|||
echo "Building docker image..." |
|||
docker build -t="redq/php81-composer" . |
|||
|
|||
echo "Installing composer dependencies..." |
|||
docker run --rm \ |
|||
-v $(pwd):/opt \ |
|||
-w /opt \ |
|||
redq/php81-composer:latest \ |
|||
composer install |
|||
|
|||
echo "Stopping running sail container if any..." |
|||
./vendor/bin/sail down |
|||
|
|||
echo "Starting app container..." |
|||
./vendor/bin/sail up -d |
|||
|
|||
echo "Generating application key..." |
|||
./vendor/bin/sail artisan key:generate |
|||
|
|||
sleep 30 & PID=$! #simulate a long process |
|||
|
|||
echo "Processing please be patient..." |
|||
printf "[" |
|||
# While process is running... |
|||
while kill -0 $PID 2> /dev/null; do |
|||
printf "▇" |
|||
sleep 1 |
|||
done |
|||
echo "]" |
|||
|
|||
echo "Installing marvel dependncies..." |
|||
./vendor/bin/sail artisan marvel:install |
|||
|
|||
FILE=public/storage |
|||
if [ ! -h "$FILE" ]; then |
|||
echo "Linking storage path..." |
|||
./vendor/bin/sail artisan storage:link |
|||
fi |
|||
|
|||
echo "Installation Successful!" |
|||
|
|||
echo "- GraphQL Playground Endpoint: http://localhost/playground" |
|||
echo "- Graphql Endpoint: http://localhost/graphql" |
|||
echo "- REST Endpoint: http://localhost/" |
@ -0,0 +1,20 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Language Lines |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The following language lines are used during authentication for various |
|||
| messages that we need to display to the user. You are free to modify |
|||
| these language lines according to your application's requirements. |
|||
| |
|||
*/ |
|||
|
|||
'failed' => 'These credentials do not match our records.', |
|||
'password' => 'The provided password is incorrect.', |
|||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', |
|||
|
|||
]; |
@ -0,0 +1,19 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Pagination Language Lines |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The following language lines are used by the paginator library to build |
|||
| the simple pagination links. You are free to change them to anything |
|||
| you want to customize your views to better match your application. |
|||
| |
|||
*/ |
|||
|
|||
'previous' => '« Previous', |
|||
'next' => 'Next »', |
|||
|
|||
]; |
@ -0,0 +1,22 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Password Reset Language Lines |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The following language lines are the default lines which match reasons |
|||
| that are given by the password broker for a password update attempt |
|||
| has failed, such as for an invalid token or invalid new password. |
|||
| |
|||
*/ |
|||
|
|||
'reset' => 'Your password has been reset!', |
|||
'sent' => 'We have emailed your password reset link!', |
|||
'throttled' => 'Please wait before retrying.', |
|||
'token' => 'This password reset token is invalid.', |
|||
'user' => "We can't find a user with that email address.", |
|||
|
|||
]; |
@ -0,0 +1,152 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Validation Language Lines |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The following language lines contain the default error messages used by |
|||
| the validator class. Some of these rules have multiple versions such |
|||
| as the size rules. Feel free to tweak each of these messages here. |
|||
| |
|||
*/ |
|||
|
|||
'accepted' => 'The :attribute must be accepted.', |
|||
'active_url' => 'The :attribute is not a valid URL.', |
|||
'after' => 'The :attribute must be a date after :date.', |
|||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.', |
|||
'alpha' => 'The :attribute may only contain letters.', |
|||
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', |
|||
'alpha_num' => 'The :attribute may only contain letters and numbers.', |
|||
'array' => 'The :attribute must be an array.', |
|||
'before' => 'The :attribute must be a date before :date.', |
|||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.', |
|||
'between' => [ |
|||
'numeric' => 'The :attribute must be between :min and :max.', |
|||
'file' => 'The :attribute must be between :min and :max kilobytes.', |
|||
'string' => 'The :attribute must be between :min and :max characters.', |
|||
'array' => 'The :attribute must have between :min and :max items.', |
|||
], |
|||
'boolean' => 'The :attribute field must be true or false.', |
|||
'confirmed' => 'The :attribute confirmation does not match.', |
|||
'date' => 'The :attribute is not a valid date.', |
|||
'date_equals' => 'The :attribute must be a date equal to :date.', |
|||
'date_format' => 'The :attribute does not match the format :format.', |
|||
'different' => 'The :attribute and :other must be different.', |
|||
'digits' => 'The :attribute must be :digits digits.', |
|||
'digits_between' => 'The :attribute must be between :min and :max digits.', |
|||
'dimensions' => 'The :attribute has invalid image dimensions.', |
|||
'distinct' => 'The :attribute field has a duplicate value.', |
|||
'email' => 'The :attribute must be a valid email address.', |
|||
'ends_with' => 'The :attribute must end with one of the following: :values.', |
|||
'exists' => 'The selected :attribute is invalid.', |
|||
'file' => 'The :attribute must be a file.', |
|||
'filled' => 'The :attribute field must have a value.', |
|||
'gt' => [ |
|||
'numeric' => 'The :attribute must be greater than :value.', |
|||
'file' => 'The :attribute must be greater than :value kilobytes.', |
|||
'string' => 'The :attribute must be greater than :value characters.', |
|||
'array' => 'The :attribute must have more than :value items.', |
|||
], |
|||
'gte' => [ |
|||
'numeric' => 'The :attribute must be greater than or equal :value.', |
|||
'file' => 'The :attribute must be greater than or equal :value kilobytes.', |
|||
'string' => 'The :attribute must be greater than or equal :value characters.', |
|||
'array' => 'The :attribute must have :value items or more.', |
|||
], |
|||
'image' => 'The :attribute must be an image.', |
|||
'in' => 'The selected :attribute is invalid.', |
|||
'in_array' => 'The :attribute field does not exist in :other.', |
|||
'integer' => 'The :attribute must be an integer.', |
|||
'ip' => 'The :attribute must be a valid IP address.', |
|||
'ipv4' => 'The :attribute must be a valid IPv4 address.', |
|||
'ipv6' => 'The :attribute must be a valid IPv6 address.', |
|||
'json' => 'The :attribute must be a valid JSON string.', |
|||
'lt' => [ |
|||
'numeric' => 'The :attribute must be less than :value.', |
|||
'file' => 'The :attribute must be less than :value kilobytes.', |
|||
'string' => 'The :attribute must be less than :value characters.', |
|||
'array' => 'The :attribute must have less than :value items.', |
|||
], |
|||
'lte' => [ |
|||
'numeric' => 'The :attribute must be less than or equal :value.', |
|||
'file' => 'The :attribute must be less than or equal :value kilobytes.', |
|||
'string' => 'The :attribute must be less than or equal :value characters.', |
|||
'array' => 'The :attribute must not have more than :value items.', |
|||
], |
|||
'max' => [ |
|||
'numeric' => 'The :attribute may not be greater than :max.', |
|||
'file' => 'The :attribute may not be greater than :max kilobytes.', |
|||
'string' => 'The :attribute may not be greater than :max characters.', |
|||
'array' => 'The :attribute may not have more than :max items.', |
|||
], |
|||
'mimes' => 'The :attribute must be a file of type: :values.', |
|||
'mimetypes' => 'The :attribute must be a file of type: :values.', |
|||
'min' => [ |
|||
'numeric' => 'The :attribute must be at least :min.', |
|||
'file' => 'The :attribute must be at least :min kilobytes.', |
|||
'string' => 'The :attribute must be at least :min characters.', |
|||
'array' => 'The :attribute must have at least :min items.', |
|||
], |
|||
'multiple_of' => 'The :attribute must be a multiple of :value', |
|||
'not_in' => 'The selected :attribute is invalid.', |
|||
'not_regex' => 'The :attribute format is invalid.', |
|||
'numeric' => 'The :attribute must be a number.', |
|||
'password' => 'The password is incorrect.', |
|||
'present' => 'The :attribute field must be present.', |
|||
'regex' => 'The :attribute format is invalid.', |
|||
'required' => 'The :attribute field is required.', |
|||
'required_if' => 'The :attribute field is required when :other is :value.', |
|||
'required_unless' => 'The :attribute field is required unless :other is in :values.', |
|||
'required_with' => 'The :attribute field is required when :values is present.', |
|||
'required_with_all' => 'The :attribute field is required when :values are present.', |
|||
'required_without' => 'The :attribute field is required when :values is not present.', |
|||
'required_without_all' => 'The :attribute field is required when none of :values are present.', |
|||
'same' => 'The :attribute and :other must match.', |
|||
'size' => [ |
|||
'numeric' => 'The :attribute must be :size.', |
|||
'file' => 'The :attribute must be :size kilobytes.', |
|||
'string' => 'The :attribute must be :size characters.', |
|||
'array' => 'The :attribute must contain :size items.', |
|||
], |
|||
'starts_with' => 'The :attribute must start with one of the following: :values.', |
|||
'string' => 'The :attribute must be a string.', |
|||
'timezone' => 'The :attribute must be a valid zone.', |
|||
'unique' => 'The :attribute has already been taken.', |
|||
'uploaded' => 'The :attribute failed to upload.', |
|||
'url' => 'The :attribute format is invalid.', |
|||
'uuid' => 'The :attribute must be a valid UUID.', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Custom Validation Language Lines |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify custom validation messages for attributes using the |
|||
| convention "attribute.rule" to name the lines. This makes it quick to |
|||
| specify a specific custom language line for a given attribute rule. |
|||
| |
|||
*/ |
|||
|
|||
'custom' => [ |
|||
'attribute-name' => [ |
|||
'rule-name' => 'custom-message', |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Custom Validation Attributes |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The following language lines are used to swap our attribute placeholder |
|||
| with something more reader friendly such as "E-Mail Address" instead |
|||
| of "email". This simply helps us make our message more expressive. |
|||
| |
|||
*/ |
|||
|
|||
'attributes' => [], |
|||
|
|||
]; |
@ -0,0 +1,21 @@ |
|||
{ |
|||
"private": true, |
|||
"version": "6.6.0", |
|||
"scripts": { |
|||
"dev": "npm run development", |
|||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js", |
|||
"watch": "npm run development -- --watch", |
|||
"watch-poll": "npm run watch -- --watch-poll", |
|||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", |
|||
"prod": "npm run production", |
|||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js" |
|||
}, |
|||
"devDependencies": { |
|||
"axios": "^0.19", |
|||
"cross-env": "^7.0", |
|||
"laravel-mix": "^5.0.1", |
|||
"lodash": "^4.17.19", |
|||
"resolve-url-loader": "^3.1.0", |
|||
"vue-template-compiler": "^2.6.14" |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
/node_modules |
|||
/public/hot |
|||
/public/storage |
|||
/storage/*.key |
|||
/storage/framework/cache |
|||
/vendor |
|||
.env |
|||
.env.backup |
|||
.phpunit.result.cache |
|||
docker-compose.override.yml |
|||
Homestead.json |
|||
Homestead.yaml |
|||
npm-debug.log |
|||
yarn-error.log |
@ -0,0 +1 @@ |
|||
preset: laravel |
@ -0,0 +1,77 @@ |
|||
{ |
|||
"name": "marvel/shop", |
|||
"description": ":package_description", |
|||
"license": "license", |
|||
"authors": [ |
|||
{ |
|||
"name": "RedQ", |
|||
"email": "support@redqteam.com", |
|||
"homepage": "https://redq.io" |
|||
} |
|||
], |
|||
"homepage": "https://github.com/marvel/gateway", |
|||
"keywords": [ |
|||
"Laravel", |
|||
"Shop" |
|||
], |
|||
"require": { |
|||
"illuminate/support": "~9|~10", |
|||
"nuwave/lighthouse": "5.71.0", |
|||
"laravel/legacy-factories": "1.3.2", |
|||
"cviebrock/eloquent-sluggable": "10.0.0", |
|||
"laravel/sanctum": "3.3.1", |
|||
"prettus/l5-repository": "2.9.0", |
|||
"spatie/laravel-medialibrary": "10.14.0", |
|||
"spatie/laravel-permission": "6.0.0", |
|||
"php-http/guzzle7-adapter": "1.0.0", |
|||
"bensampo/laravel-enum": "6.6.4", |
|||
"league/flysystem-aws-s3-v3": "3.16.0", |
|||
"drewm/mailchimp-api": "^2.5", |
|||
"spatie/laravel-newsletter": "5.1.1", |
|||
"spatie/period": "2.4.0", |
|||
"kodeine/laravel-meta": "2.2.1", |
|||
"maatwebsite/excel": "3.1.48", |
|||
"cknow/laravel-money": "7.2.0", |
|||
"mollie/laravel-mollie": "2.25.0", |
|||
"mll-lab/graphql-php-scalars": "5.4.1", |
|||
"razorpay/razorpay": "2.8.7", |
|||
"unicodeveloper/laravel-paystack": "1.1.0", |
|||
"stripe/stripe-php": "13.1.0", |
|||
"dgvai/laravel-sslcommerz": "^1.0", |
|||
"iyzico/iyzipay-php": "^2.0", |
|||
"luigel/laravel-paymongo": "^2.4", |
|||
"mll-lab/laravel-graphiql": "^3.1", |
|||
"pusher/pusher-php-server": "^7.2", |
|||
"openai-php/client": "^0.7.4", |
|||
"twilio/sdk": "7.12.0", |
|||
"xendit/xendit-php": "^3.0.0", |
|||
"srmklive/paypal": "3.0.19" |
|||
}, |
|||
"require-dev": { |
|||
"phpunit/phpunit": "10.0.13", |
|||
"mockery/mockery": "1.5.1", |
|||
"orchestra/testbench": "8.0.4", |
|||
"sempro/phpunit-pretty-print": "1.4.0" |
|||
}, |
|||
"autoload": { |
|||
"classmap": [ |
|||
"src", |
|||
"stubs" |
|||
] |
|||
}, |
|||
"autoload-dev": { |
|||
"psr-4": { |
|||
"Marvel\\Tests\\": "tests" |
|||
} |
|||
}, |
|||
"extra": { |
|||
"laravel": { |
|||
"providers": [ |
|||
"Marvel\\ShopServiceProvider" |
|||
], |
|||
"aliases": { |
|||
"Shop": "Marvel\\Facades\\Shop" |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,133 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Defaults |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default authentication "guard" and password |
|||
| reset options for your application. You may change these defaults |
|||
| as required, but they're a perfect start for most applications. |
|||
| |
|||
*/ |
|||
|
|||
'defaults' => [ |
|||
'guard' => 'api', |
|||
'passwords' => 'users', |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Guards |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Next, you may define every authentication guard for your application. |
|||
| Of course, a great default configuration has been defined for you |
|||
| here which uses session storage and the Eloquent user provider. |
|||
| |
|||
| All authentication drivers have a user provider. This defines how the |
|||
| users are actually retrieved out of your database or other storage |
|||
| mechanisms used by this application to persist your user's data. |
|||
| |
|||
| Supported: "session", "token" |
|||
| |
|||
*/ |
|||
|
|||
'guards' => [ |
|||
'web' => [ |
|||
'driver' => 'session', |
|||
'provider' => 'users', |
|||
], |
|||
|
|||
'api' => [ |
|||
'driver' => 'sanctum', |
|||
'provider' => 'users', |
|||
], |
|||
'sanctum' => [ |
|||
'driver' => 'sanctum', |
|||
'provider' => 'users', |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| User Providers |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| All authentication drivers have a user provider. This defines how the |
|||
| users are actually retrieved out of your database or other storage |
|||
| mechanisms used by this application to persist your user's data. |
|||
| |
|||
| If you have multiple user tables or models you may configure multiple |
|||
| sources which represent each model / table. These sources may then |
|||
| be assigned to any extra authentication guards you have defined. |
|||
| |
|||
| Supported: "database", "eloquent" |
|||
| |
|||
*/ |
|||
|
|||
'providers' => [ |
|||
'users' => [ |
|||
'driver' => 'eloquent', |
|||
'model' => \Marvel\Database\Models\User::class, |
|||
], |
|||
|
|||
// 'users' => [
|
|||
// 'driver' => 'database',
|
|||
// 'table' => 'users',
|
|||
// ],
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Resetting Passwords |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| You may specify multiple password reset configurations if you have more |
|||
| than one user table or model in the application and you want to have |
|||
| separate password reset settings based on the specific user types. |
|||
| |
|||
| The expire time is the number of minutes that the reset token should be |
|||
| considered valid. This security feature keeps tokens short-lived so |
|||
| they have less time to be guessed. You may change this as needed. |
|||
| |
|||
*/ |
|||
|
|||
'passwords' => [ |
|||
'users' => [ |
|||
'provider' => 'users', |
|||
'table' => 'password_resets', |
|||
'expire' => 60, |
|||
'throttle' => 60, |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Password Confirmation Timeout |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define the amount of seconds before a password confirmation |
|||
| times out and the user is prompted to re-enter their password via the |
|||
| confirmation screen. By default, the timeout lasts for three hours. |
|||
| |
|||
*/ |
|||
|
|||
'password_timeout' => 10800, |
|||
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Active OTP Gateway |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here active otp gateway value will be taken form the environment variables. |
|||
| values can be 'twilio'|'messagebird' |
|||
| |
|||
*/ |
|||
|
|||
'active_otp_gateway' => env('ACTIVE_OTP_GATEWAY', 'twilio'), |
|||
|
|||
]; |
@ -0,0 +1,64 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Broadcaster |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default broadcaster that will be used by the |
|||
| framework when an event needs to be broadcast. You may set this to |
|||
| any of the connections defined in the "connections" array below. |
|||
| |
|||
| Supported: "pusher", "redis", "log", "null" |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('BROADCAST_DRIVER', 'null'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Broadcast Connections |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define all of the broadcast connections that will be used |
|||
| to broadcast events to other systems or over websockets. Samples of |
|||
| each available type of connection are provided inside this array. |
|||
| |
|||
*/ |
|||
|
|||
'connections' => [ |
|||
|
|||
'pusher' => [ |
|||
'driver' => 'pusher', |
|||
'key' => env('PUSHER_APP_KEY'), |
|||
'secret' => env('PUSHER_APP_SECRET'), |
|||
'app_id' => env('PUSHER_APP_ID'), |
|||
'options' => [ |
|||
'cluster' => env('PUSHER_APP_CLUSTER'), |
|||
'useTLS' => false, |
|||
], |
|||
], |
|||
|
|||
'ably' => [ |
|||
'driver' => 'ably', |
|||
'key' => env('ABLY_KEY'), |
|||
], |
|||
|
|||
'redis' => [ |
|||
'driver' => 'redis', |
|||
'connection' => 'default', |
|||
], |
|||
|
|||
'log' => [ |
|||
'driver' => 'log', |
|||
], |
|||
|
|||
'null' => [ |
|||
'driver' => 'null', |
|||
], |
|||
|
|||
], |
|||
|
|||
]; |
@ -0,0 +1,105 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Str; |
|||
|
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Cache Store |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default cache connection that gets used while |
|||
| using this caching library. This connection is used when another is |
|||
| not explicitly specified when executing a given caching function. |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('CACHE_DRIVER', 'file'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Stores |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define all of the cache "stores" for your application as |
|||
| well as their drivers. You may even define multiple stores for the |
|||
| same cache driver to group types of items stored in your caches. |
|||
| |
|||
| Supported drivers: "apc", "array", "database", "file", |
|||
| "memcached", "redis", "dynamodb", "null" |
|||
| |
|||
*/ |
|||
|
|||
'stores' => [ |
|||
|
|||
'apc' => [ |
|||
'driver' => 'apc', |
|||
], |
|||
|
|||
'array' => [ |
|||
'driver' => 'array', |
|||
'serialize' => false, |
|||
], |
|||
|
|||
'database' => [ |
|||
'driver' => 'database', |
|||
'table' => 'cache', |
|||
'connection' => null, |
|||
], |
|||
|
|||
'file' => [ |
|||
'driver' => 'file', |
|||
'path' => storage_path('framework/cache/data'), |
|||
], |
|||
|
|||
'memcached' => [ |
|||
'driver' => 'memcached', |
|||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), |
|||
'sasl' => [ |
|||
env('MEMCACHED_USERNAME'), |
|||
env('MEMCACHED_PASSWORD'), |
|||
], |
|||
'options' => [ |
|||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
|||
], |
|||
'servers' => [ |
|||
[ |
|||
'host' => env('MEMCACHED_HOST', '127.0.0.1'), |
|||
'port' => env('MEMCACHED_PORT', 11211), |
|||
'weight' => 100, |
|||
], |
|||
], |
|||
], |
|||
|
|||
'redis' => [ |
|||
'driver' => 'redis', |
|||
'connection' => 'cache', |
|||
], |
|||
|
|||
'dynamodb' => [ |
|||
'driver' => 'dynamodb', |
|||
'key' => env('AWS_ACCESS_KEY_ID'), |
|||
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
|||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
|||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), |
|||
'endpoint' => env('DYNAMODB_ENDPOINT'), |
|||
], |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Key Prefix |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When utilizing a RAM based store such as APC or Memcached, there might |
|||
| be other applications utilizing the same cache. So, we'll specify a |
|||
| value to get prefixed to all our keys so we can avoid collisions. |
|||
| |
|||
*/ |
|||
|
|||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'), |
|||
|
|||
]; |
@ -0,0 +1,71 @@ |
|||
<?php |
|||
|
|||
define('APP_NOTICE_DOMAIN', config('shop.app_notice_domain')); |
|||
define('DEFAULT_LANGUAGE', config('shop.default_language')); |
|||
define('TRANSLATION_ENABLED', config('shop.translation_enabled')); |
|||
define('DEFAULT_CURRENCY', config('shop.default_currency')); |
|||
define('DEFAULT_CURRENCY_FORMATION', 'en-US'); |
|||
define('ACTIVE_PAYMENT_GATEWAY', config('shop.active_payment_gateway')); |
|||
define('NOT_FOUND', APP_NOTICE_DOMAIN . 'ERROR.NOT_FOUND'); |
|||
define('COUPON_NOT_FOUND', APP_NOTICE_DOMAIN . 'ERROR.COUPON_NOT_FOUND'); |
|||
define('INVALID_COUPON_CODE', APP_NOTICE_DOMAIN . 'ERROR.INVALID_COUPON_CODE'); |
|||
define('COUPON_CODE_IS_NOT_APPLICABLE', APP_NOTICE_DOMAIN . 'ERROR.COUPON_CODE_IS_NOT_APPLICABLE'); |
|||
define('ALREADY_FREE_SHIPPING_ACTIVATED', APP_NOTICE_DOMAIN . 'ERROR.ALREADY_FREE_SHIPPING_ACTIVATED'); |
|||
define('CART_ITEMS_NOT_FOUND', APP_NOTICE_DOMAIN . 'ERROR.CART_ITEMS_NOT_FOUND'); |
|||
define('NOT_A_RENTAL_PRODUCT', APP_NOTICE_DOMAIN . 'ERROR.NOT_A_RENTAL_PRODUCT'); |
|||
define('NOT_AUTHORIZED', APP_NOTICE_DOMAIN . 'ERROR.NOT_AUTHORIZED'); |
|||
define('SOMETHING_WENT_WRONG', APP_NOTICE_DOMAIN . 'ERROR.SOMETHING_WENT_WRONG'); |
|||
define('PAYMENT_FAILED', APP_NOTICE_DOMAIN . 'ERROR.PAYMENT_FAILED'); |
|||
define('SHOP_NOT_APPROVED', APP_NOTICE_DOMAIN . 'ERROR.SHOP_NOT_APPROVED'); |
|||
define('INSUFFICIENT_BALANCE', APP_NOTICE_DOMAIN . 'ERROR.INSUFFICIENT_BALANCE'); |
|||
define('INVALID_CREDENTIALS', APP_NOTICE_DOMAIN . 'ERROR.INVALID_CREDENTIALS'); |
|||
define('EMAIL_SENT_SUCCESSFUL', APP_NOTICE_DOMAIN . 'MESSAGE.EMAIL_SENT_SUCCESSFUL'); |
|||
define('PASSWORD_RESET_SUCCESSFUL', APP_NOTICE_DOMAIN . 'MESSAGE.PASSWORD_RESET_SUCCESSFUL'); |
|||
define('INVALID_TOKEN', APP_NOTICE_DOMAIN . 'MESSAGE.INVALID_TOKEN'); |
|||
define('TOKEN_IS_VALID', APP_NOTICE_DOMAIN . 'MESSAGE.TOKEN_IS_VALID'); |
|||
define('CHECK_INBOX_FOR_PASSWORD_RESET_EMAIL', APP_NOTICE_DOMAIN . 'MESSAGE.CHECK_INBOX_FOR_PASSWORD_RESET_EMAIL'); |
|||
define('ACTION_NOT_VALID', APP_NOTICE_DOMAIN . 'ERROR.ACTION_NOT_VALID'); |
|||
define('PLEASE_LOGIN_USING_FACEBOOK_OR_GOOGLE', APP_NOTICE_DOMAIN . 'ERROR.PLEASE_LOGIN_USING_FACEBOOK_OR_GOOGLE'); |
|||
define('WITHDRAW_MUST_BE_ATTACHED_TO_SHOP', APP_NOTICE_DOMAIN . 'ERROR.WITHDRAW_MUST_BE_ATTACHED_TO_SHOP'); |
|||
define('OLD_PASSWORD_INCORRECT', APP_NOTICE_DOMAIN . 'MESSAGE.OLD_PASSWORD_INCORRECT'); |
|||
define('OTP_SEND_FAIL', APP_NOTICE_DOMAIN . 'ERROR.OTP_SEND_FAIL'); |
|||
define('OTP_SEND_SUCCESSFUL', APP_NOTICE_DOMAIN . 'MESSAGE.OTP_SEND_SUCCESSFUL'); |
|||
define('REQUIRED_INFO_MISSING', APP_NOTICE_DOMAIN . 'MESSAGE.REQUIRED_INFO_MISSING'); |
|||
define('CONTACT_UPDATE_SUCCESSFUL', APP_NOTICE_DOMAIN . 'MESSAGE.CONTACT_UPDATE_SUCCESSFUL'); |
|||
define('INVALID_GATEWAY', APP_NOTICE_DOMAIN . 'ERROR.INVALID_GATEWAY'); |
|||
define('OTP_VERIFICATION_FAILED', APP_NOTICE_DOMAIN . 'ERROR.OTP_VERIFICATION_FAILED'); |
|||
define('CONTACT_UPDATE_FAILED', APP_NOTICE_DOMAIN . 'ERROR.CONTACT_UPDATE_FAILED'); |
|||
define('ALREADY_REFUNDED', APP_NOTICE_DOMAIN . 'ERROR.ALREADY_REFUNDED'); |
|||
define('ORDER_ALREADY_HAS_REFUND_REQUEST', APP_NOTICE_DOMAIN . 'ERROR.ORDER_ALREADY_HAS_REFUND_REQUEST'); |
|||
define('REFUND_ONLY_ALLOWED_FOR_MAIN_ORDER', APP_NOTICE_DOMAIN . 'ERROR.REFUND_ONLY_ALLOWED_FOR_MAIN_ORDER'); |
|||
define('WRONG_REFUND', APP_NOTICE_DOMAIN . 'ERROR.WRONG_REFUND'); |
|||
define('CSV_NOT_FOUND', APP_NOTICE_DOMAIN . 'ERROR.CSV_NOT_FOUND'); |
|||
define('ALREADY_GIVEN_REVIEW_FOR_THIS_PRODUCT', APP_NOTICE_DOMAIN . 'ERROR.ALREADY_GIVEN_REVIEW_FOR_THIS_PRODUCT'); |
|||
define('USER_NOT_FOUND', APP_NOTICE_DOMAIN . 'ERROR.USER_NOT_FOUND'); |
|||
define('TOKEN_NOT_FOUND', APP_NOTICE_DOMAIN . 'ERROR.TOKEN_NOT_FOUND'); |
|||
define('NOT_AVAILABLE_FOR_BOOKING', APP_NOTICE_DOMAIN . 'ERROR.NOT_AVAILABLE_FOR_BOOKING'); |
|||
define('YOU_HAVE_ALREADY_GIVEN_ABUSIVE_REPORT_FOR_THIS', APP_NOTICE_DOMAIN . 'ERROR.YOU_HAVE_ALREADY_GIVEN_ABUSIVE_REPORT_FOR_THIS'); |
|||
define('MAXIMUM_QUESTION_LIMIT_EXCEEDED', APP_NOTICE_DOMAIN . 'ERROR.MAXIMUM_QUESTION_LIMIT_EXCEEDED'); |
|||
define('INVALID_AMOUNT', APP_NOTICE_DOMAIN . 'ERROR.INVALID_AMOUNT'); |
|||
define('INVALID_CARD', APP_NOTICE_DOMAIN . 'ERROR.INVALID_CARD'); |
|||
define('TOO_MANY_REQUEST', APP_NOTICE_DOMAIN . 'ERROR.TOO_MANY_REQUEST'); |
|||
define('INVALID_REQUEST', APP_NOTICE_DOMAIN . 'ERROR.INVALID_REQUEST'); |
|||
define('AUTHENTICATION_FAILED', APP_NOTICE_DOMAIN . 'ERROR.AUTHENTICATION_FAILED'); |
|||
define('API_CONNECTION_FAILED', APP_NOTICE_DOMAIN . 'ERROR.API_CONNECTION_FAILED'); |
|||
define('SOMETHING_WENT_WRONG_WITH_PAYMENT', APP_NOTICE_DOMAIN . 'ERROR.SOMETHING_WENT_WRONG_WITH_PAYMENT'); |
|||
define('INVALID_PAYMENT_ID', APP_NOTICE_DOMAIN . 'ERROR.INVALID_PAYMENT_ID'); |
|||
define('INVALID_PAYMENT_INTENT_ID', APP_NOTICE_DOMAIN . 'ERROR.INVALID_PAYMENT_INTENT_ID'); |
|||
define('EMAIL_NOT_VERIFIED', 'EMAIL_NOT_VERIFIED'); |
|||
define('INVALID_LICENSE_KEY', 'INVALID_LICENSE_KEY'); |
|||
define('EMAIL_UPDATED_SUCCESSFULLY', APP_NOTICE_DOMAIN . 'SUCCESS.EMAIL_UPDATED_SUCCESSFULLY'); |
|||
define('YOU_CAN_NOT_SEND_MESSAGE_TO_YOUR_OWN_SHOP', APP_NOTICE_DOMAIN . 'ERROR.YOU_CAN_NOT_SEND_MESSAGE_TO_YOUR_OWN_SHOP'); |
|||
define('COULD_NOT_CREATE_THE_RESOURCE', APP_NOTICE_DOMAIN . 'ERROR.COULD_NOT_CREATE_THE_RESOURCE'); |
|||
define('COULD_NOT_UPDATE_THE_RESOURCE', APP_NOTICE_DOMAIN . 'ERROR.COULD_NOT_UPDATE_THE_RESOURCE'); |
|||
define('COULD_NOT_DELETE_THE_RESOURCE', APP_NOTICE_DOMAIN . 'ERROR.COULD_NOT_DELETE_THE_RESOURCE'); |
|||
define('PLEASE_ENABLE_OPENAI_FROM_THE_SETTINGS', APP_NOTICE_DOMAIN . 'ERROR.PLEASE_ENABLE_OPENAI_FROM_THE_SETTINGS'); |
|||
define('DUMMY_DATA_PATH', config('shop.dummy_data_path')); |
|||
define('THIS_COUPON_CODE_IS_ONLY_FOR_VERIFIED_USERS', APP_NOTICE_DOMAIN . 'ERROR.THIS_COUPON_CODE_IS_ONLY_FOR_VERIFIED_USERS'); |
|||
define('THIS_COUPON_CODE_IS_NOT_APPROVED', APP_NOTICE_DOMAIN . 'ERROR.THIS_COUPON_CODE_IS_NOT_APPROVED'); |
|||
define('COUPON_CODE_IS_NOT_APPLICABLE_IN_THIS_SHOP_PRODUCT', APP_NOTICE_DOMAIN . 'ERROR.COUPON_CODE_IS_NOT_APPLICABLE_IN_THIS_SHOP_PRODUCT'); |
|||
define('PLEASE_ENABLE_PAYMENT_OPTION_FROM_THE_SETTINGS', APP_NOTICE_DOMAIN . 'ERROR.PLEASE_ENABLE_PAYMENT_OPTION_FROM_THE_SETTINGS'); |
|||
define('COULD_NOT_SETTLE_THE_TRANSITION', APP_NOTICE_DOMAIN . 'ERROR.COULD_NOT_SETTLE_THE_TRANSITION'); |
@ -0,0 +1,34 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cross-Origin Resource Sharing (CORS) Configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure your settings for cross-origin resource sharing |
|||
| or "CORS". This determines what cross-origin operations may execute |
|||
| in web browsers. You are free to adjust these settings as needed. |
|||
| |
|||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS |
|||
| |
|||
*/ |
|||
|
|||
'paths' => ['api/*', '*', 'sanctum/csrf-cookie', 'graphql'], |
|||
|
|||
'allowed_methods' => ['*'], |
|||
|
|||
'allowed_origins' => ['*'], |
|||
|
|||
'allowed_origins_patterns' => [], |
|||
|
|||
'allowed_headers' => ['*'], |
|||
|
|||
'exposed_headers' => [], |
|||
|
|||
'max_age' => 0, |
|||
|
|||
'supports_credentials' => false, |
|||
|
|||
]; |
@ -0,0 +1,31 @@ |
|||
<?php |
|||
|
|||
/* |
|||
* This file is part of the Laravel Rave package. |
|||
* |
|||
* (c) Oluwole Adebiyi - Flamez <flamekeed@gmail.com> |
|||
* |
|||
* For the full copyright and license information, please view the LICENSE |
|||
* file that was distributed with this source code. |
|||
*/ |
|||
|
|||
return [ |
|||
|
|||
/** |
|||
* Public Key: Your Rave publicKey. Sign up on https://dashboard.flutterwave.com/ to get one from your settings page |
|||
* |
|||
*/ |
|||
'publicKey' => env('FLW_PUBLIC_KEY'), |
|||
|
|||
/** |
|||
* Secret Key: Your Rave secretKey. Sign up on https://dashboard.flutterwave.com/ to get one from your settings page |
|||
* |
|||
*/ |
|||
'secretKey' => env('FLW_SECRET_KEY'), |
|||
|
|||
/** |
|||
* Prefix: Secret hash for webhook |
|||
* |
|||
*/ |
|||
'secretHash' => env('FLW_SECRET_HASH', ''), |
|||
]; |
@ -0,0 +1,64 @@ |
|||
<?php declare(strict_types=1); |
|||
|
|||
return [ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Routes configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Set the key as URI at which the GraphiQL UI can be viewed, |
|||
| and add any additional configuration for the route. |
|||
| |
|||
| You can add multiple routes pointing to different GraphQL endpoints. |
|||
| |
|||
*/ |
|||
|
|||
'routes' => [ |
|||
'/playground' => [ |
|||
'name' => 'graphiql', |
|||
// 'middleware' => ['web']
|
|||
// 'prefix' => '',
|
|||
// 'domain' => 'graphql.' . env('APP_DOMAIN', 'localhost'),
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default GraphQL endpoint |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The default endpoint that the GraphiQL UI is set to. |
|||
| It assumes you are running GraphQL on the same domain |
|||
| as GraphiQL, but can be set to any URL. |
|||
| |
|||
*/ |
|||
|
|||
'endpoint' => '/graphql', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Subscription endpoint |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The default subscription endpoint the GraphiQL UI uses to connect to. |
|||
| Tries to connect to the `endpoint` value if `null` as ws://{{endpoint}} |
|||
| |
|||
| Example: `ws://your-endpoint` or `wss://your-endpoint` |
|||
| |
|||
*/ |
|||
|
|||
'subscription-endpoint' => env('GRAPHIQL_SUBSCRIPTION_ENDPOINT', null), |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Control GraphiQL availability |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Control if the GraphiQL UI is accessible at all. |
|||
| This allows you to disable it in certain environments, |
|||
| for example you might not want it active in production. |
|||
| |
|||
*/ |
|||
|
|||
'enabled' => env('GRAPHIQL_ENABLED', true), |
|||
]; |
@ -0,0 +1,49 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
return [ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Route configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Set the URI at which the GraphQL Playground can be viewed |
|||
| and any additional configuration for the route. |
|||
| |
|||
*/ |
|||
|
|||
'route' => [ |
|||
'uri' => '/playground', |
|||
'name' => 'playground', |
|||
// 'middleware' => ['web']
|
|||
// 'prefix' => '',
|
|||
// 'domain' => 'graphql.' . env('APP_DOMAIN', 'localhost'),
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default GraphQL endpoint |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The default endpoint that the Playground UI is set to. |
|||
| It assumes you are running GraphQL on the same domain |
|||
| as GraphQL Playground, but can be set to any URL. |
|||
| |
|||
*/ |
|||
|
|||
'endpoint' => '/graphql', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Control Playground availability |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Control if the playground is accessible at all. |
|||
| This allows you to disable it in certain environments, |
|||
| for example you might not want it active in production. |
|||
| |
|||
*/ |
|||
|
|||
'enabled' => env('GRAPHQL_PLAYGROUND_ENABLED', true), |
|||
]; |
@ -0,0 +1,29 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
// The default gateway to use
|
|||
'default' => 'STRIPE', |
|||
|
|||
// Add in each gateway here
|
|||
'gateways' => [ |
|||
'PAYPAL' => [ |
|||
'driver' => 'PayPal_Express', |
|||
'options' => [ |
|||
'solutionType' => '', |
|||
'landingPage' => '', |
|||
'headerImageUrl' => '', |
|||
'testMode' => env('OMNIPAY_TEST_MODE', true) |
|||
|
|||
] |
|||
], |
|||
'STRIPE' => [ |
|||
'driver' => 'Stripe', |
|||
'options' => [ |
|||
'apiKey' => env('STRIPE_API_KEY', config('shop.stripe_api_key')), |
|||
'testMode' => env('OMNIPAY_TEST_MODE', true) |
|||
] |
|||
] |
|||
] |
|||
|
|||
]; |
@ -0,0 +1,600 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Route Configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Controls the HTTP route that your GraphQL server responds to. |
|||
| You may set `route` => false, to disable the default route |
|||
| registration and take full control. |
|||
| |
|||
*/ |
|||
|
|||
'route' => [ |
|||
/* |
|||
* The URI the endpoint responds to, e.g. mydomain.com/graphql. |
|||
*/ |
|||
'uri' => '/graphql', |
|||
|
|||
/* |
|||
* Lighthouse creates a named route for convenient URL generation and redirects. |
|||
*/ |
|||
'name' => 'graphql', |
|||
|
|||
/* |
|||
* Beware that middleware defined here runs before the GraphQL execution phase, |
|||
* make sure to return spec-compliant responses in case an error is thrown. |
|||
*/ |
|||
'middleware' => [ |
|||
\Nuwave\Lighthouse\Support\Http\Middleware\AcceptJson::class, |
|||
|
|||
// Logs in a user if they are authenticated. In contrast to Laravel's 'auth'
|
|||
// middleware, this delegates auth and permission checks to the field level.
|
|||
\Nuwave\Lighthouse\Support\Http\Middleware\AttemptAuthentication::class, |
|||
|
|||
// Logs every incoming GraphQL query.
|
|||
// \Nuwave\Lighthouse\Support\Http\Middleware\LogGraphQLQueries::class,
|
|||
], |
|||
|
|||
/* |
|||
* The `prefix` and `domain` configuration options are optional. |
|||
*/ |
|||
//'prefix' => '',
|
|||
//'domain' => '',
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Guard |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The guard to use for authenticating GraphQL requests, if needed. |
|||
| This setting is used whenever Lighthouse looks for an authenticated user, for example in directives |
|||
| such as `@guard` and when applying the `AttemptAuthentication` middleware. |
|||
| |
|||
*/ |
|||
|
|||
'guard' => 'api', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Schema Location |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Path to your .graphql schema file. |
|||
| Additional schema files may be imported from within that file. |
|||
| |
|||
*/ |
|||
|
|||
'schema' => [ |
|||
'register' => __DIR__ . '/../src/GraphQL/Schema/schema.graphql', |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Schema Cache |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| A large part of schema generation consists of parsing and AST manipulation. |
|||
| This operation is very expensive, so it is highly recommended to enable |
|||
| caching of the final schema to optimize performance of large schemas. |
|||
| |
|||
*/ |
|||
|
|||
'cache' => [ |
|||
/* |
|||
* Setting to true enables schema caching. |
|||
*/ |
|||
'enable' => env('LIGHTHOUSE_CACHE_ENABLE', 'local' !== env('APP_ENV')), |
|||
|
|||
/* |
|||
* Allowed values: |
|||
* - 1: uses the store, key and ttl config values to store the schema as a string in the given cache store. |
|||
* - 2: uses the path config value to store the schema in a PHP file allowing OPcache to pick it up. |
|||
*/ |
|||
'version' => env('LIGHTHOUSE_CACHE_VERSION', 1), |
|||
|
|||
/* |
|||
* The name of the cache item for the schema cache. |
|||
*/ |
|||
'version' => env('LIGHTHOUSE_CACHE_VERSION', 1), |
|||
|
|||
/* |
|||
* Allows using a specific cache store, uses the app's default if set to null. |
|||
* Only relevant if version is set to 1. |
|||
*/ |
|||
'store' => env('LIGHTHOUSE_CACHE_STORE', null), |
|||
|
|||
/* |
|||
* The name of the cache item for the schema cache. |
|||
* Only relevant if version is set to 1. |
|||
*/ |
|||
'key' => env('LIGHTHOUSE_CACHE_KEY', 'lighthouse-schema'), |
|||
|
|||
/* |
|||
* Duration in seconds the schema should remain cached, null means forever. |
|||
* Only relevant if version is set to 1. |
|||
*/ |
|||
'ttl' => env('LIGHTHOUSE_CACHE_TTL', null), |
|||
|
|||
/* |
|||
* File path to store the lighthouse schema. |
|||
* Only relevant if version is set to 2. |
|||
*/ |
|||
'path' => env('LIGHTHOUSE_CACHE_PATH', base_path('bootstrap/cache/lighthouse-schema.php')), |
|||
|
|||
/* |
|||
* Should the `@cache` directive use a tagged cache? |
|||
*/ |
|||
'tags' => false, |
|||
], |
|||
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Query Cache |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Caches the result of parsing incoming query strings to boost performance on subsequent requests. |
|||
| |
|||
*/ |
|||
|
|||
'query_cache' => [ |
|||
/* |
|||
* Setting to true enables query caching. |
|||
*/ |
|||
'enable' => env('LIGHTHOUSE_QUERY_CACHE_ENABLE', true), |
|||
|
|||
/* |
|||
* Allows using a specific cache store, uses the app's default if set to null. |
|||
*/ |
|||
'store' => env('LIGHTHOUSE_QUERY_CACHE_STORE', null), |
|||
|
|||
/* |
|||
* Duration in seconds the query should remain cached, null means forever. |
|||
*/ |
|||
'ttl' => env( |
|||
'LIGHTHOUSE_QUERY_CACHE_TTL', |
|||
\Nuwave\Lighthouse\Support\AppVersion::atLeast(5.8) |
|||
? null |
|||
: 365 * 24 * 60 // For Laravel < 5.8 the exact value must be specified and it is counted in minutes
|
|||
), |
|||
], |
|||
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Namespaces |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| These are the default namespaces where Lighthouse looks for classes to |
|||
| extend functionality of the schema. You may pass in either a string |
|||
| or an array, they are tried in order and the first match is used. |
|||
| |
|||
*/ |
|||
|
|||
'namespaces' => [ |
|||
'models' => ['App', 'Marvel\\Database\\Models'], |
|||
'queries' => ['App\\GraphQL\\Queries', 'Marvel\\GraphQL\\Queries'], |
|||
'mutations' => ['App\\GraphQL\\Mutations', 'Marvel\\GraphQL\\Mutation'], |
|||
'subscriptions' => 'App\\GraphQL\\Subscriptions', |
|||
'interfaces' => 'App\\GraphQL\\Interfaces', |
|||
'unions' => 'App\\GraphQL\\Unions', |
|||
'scalars' => 'App\\GraphQL\\Scalars', |
|||
'directives' => ['App\\GraphQL\\Directives', 'Marvel\\GraphQL\\Directives'], |
|||
'validators' => ['App\\GraphQL\\Validators'], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Security |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Control how Lighthouse handles security related query validation. |
|||
| Read more at https://webonyx.github.io/graphql-php/security/ |
|||
| |
|||
*/ |
|||
|
|||
'security' => [ |
|||
'max_query_complexity' => \GraphQL\Validator\Rules\QueryComplexity::DISABLED, |
|||
'max_query_depth' => \GraphQL\Validator\Rules\QueryDepth::DISABLED, |
|||
'disable_introspection' => \GraphQL\Validator\Rules\DisableIntrospection::DISABLED, |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Pagination |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Set defaults for the pagination features within Lighthouse, such as |
|||
| the @paginate directive, or paginated relation directives. |
|||
| |
|||
*/ |
|||
|
|||
'pagination' => [ |
|||
/* |
|||
* Allow clients to query paginated lists without specifying the amount of items. |
|||
* Setting this to `null` means clients have to explicitly ask for the count. |
|||
*/ |
|||
'default_count' => null, |
|||
|
|||
/* |
|||
* Limit the maximum amount of items that clients can request from paginated lists. |
|||
* Setting this to `null` means the count is unrestricted. |
|||
*/ |
|||
'max_count' => null, |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Debug |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Control the debug level as described in https://webonyx.github.io/graphql-php/error-handling/ |
|||
| Debugging is only applied if the global Laravel debug config is set to true. |
|||
| |
|||
| When you set this value through an environment variable, use the following reference table: |
|||
| 0 => INCLUDE_NONE |
|||
| 1 => INCLUDE_DEBUG_MESSAGE |
|||
| 2 => INCLUDE_TRACE |
|||
| 3 => INCLUDE_TRACE | INCLUDE_DEBUG_MESSAGE |
|||
| 4 => RETHROW_INTERNAL_EXCEPTIONS |
|||
| 5 => RETHROW_INTERNAL_EXCEPTIONS | INCLUDE_DEBUG_MESSAGE |
|||
| 6 => RETHROW_INTERNAL_EXCEPTIONS | INCLUDE_TRACE |
|||
| 7 => RETHROW_INTERNAL_EXCEPTIONS | INCLUDE_TRACE | INCLUDE_DEBUG_MESSAGE |
|||
| 8 => RETHROW_UNSAFE_EXCEPTIONS |
|||
| 9 => RETHROW_UNSAFE_EXCEPTIONS | INCLUDE_DEBUG_MESSAGE |
|||
| 10 => RETHROW_UNSAFE_EXCEPTIONS | INCLUDE_TRACE |
|||
| 11 => RETHROW_UNSAFE_EXCEPTIONS | INCLUDE_TRACE | INCLUDE_DEBUG_MESSAGE |
|||
| 12 => RETHROW_UNSAFE_EXCEPTIONS | RETHROW_INTERNAL_EXCEPTIONS |
|||
| 13 => RETHROW_UNSAFE_EXCEPTIONS | RETHROW_INTERNAL_EXCEPTIONS | INCLUDE_DEBUG_MESSAGE |
|||
| 14 => RETHROW_UNSAFE_EXCEPTIONS | RETHROW_INTERNAL_EXCEPTIONS | INCLUDE_TRACE |
|||
| 15 => RETHROW_UNSAFE_EXCEPTIONS | RETHROW_INTERNAL_EXCEPTIONS | INCLUDE_TRACE | INCLUDE_DEBUG_MESSAGE |
|||
| |
|||
*/ |
|||
|
|||
'debug' => env('LIGHTHOUSE_DEBUG', \GraphQL\Error\DebugFlag::INCLUDE_DEBUG_MESSAGE | \GraphQL\Error\DebugFlag::INCLUDE_TRACE), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Error Handlers |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Register error handlers that receive the Errors that occur during execution |
|||
| and handle them. You may use this to log, filter or format the errors. |
|||
| The classes must implement \Nuwave\Lighthouse\Execution\ErrorHandler |
|||
| |
|||
*/ |
|||
|
|||
'error_handlers' => [ |
|||
\Nuwave\Lighthouse\Execution\AuthenticationErrorHandler::class, |
|||
\Nuwave\Lighthouse\Execution\AuthorizationErrorHandler::class, |
|||
\Nuwave\Lighthouse\Execution\ValidationErrorHandler::class, |
|||
\Nuwave\Lighthouse\Execution\ExtensionErrorHandler::class, |
|||
\Nuwave\Lighthouse\Execution\ReportingErrorHandler::class, |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Field Middleware |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Register global field middleware directives that wrap around every field. |
|||
| Execution happens in the defined order, before other field middleware. |
|||
| The classes must implement \Nuwave\Lighthouse\Support\Contracts\FieldMiddleware |
|||
| |
|||
*/ |
|||
|
|||
'field_middleware' => [ |
|||
\Nuwave\Lighthouse\Schema\Directives\TrimDirective::class, |
|||
\Nuwave\Lighthouse\Schema\Directives\SanitizeDirective::class, |
|||
\Nuwave\Lighthouse\Validation\ValidateDirective::class, |
|||
\Nuwave\Lighthouse\Schema\Directives\TransformArgsDirective::class, |
|||
\Nuwave\Lighthouse\Schema\Directives\SpreadDirective::class, |
|||
\Nuwave\Lighthouse\Schema\Directives\RenameArgsDirective::class, |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Global ID |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The name that is used for the global id field on the Node interface. |
|||
| When creating a Relay compliant server, this must be named "id". |
|||
| |
|||
*/ |
|||
|
|||
'global_id_field' => 'id', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Batched Queries |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| GraphQL query batching means sending multiple queries to the server in one request, |
|||
| You may set this flag to either process or deny batched queries. |
|||
| |
|||
*/ |
|||
|
|||
// 'batched_queries' => true,
|
|||
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Persisted Queries |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Lighthouse supports Automatic Persisted Queries (APQ), compatible with the |
|||
| [Apollo implementation](https://www.apollographql.com/docs/apollo-server/performance/apq). |
|||
| You may set this flag to either process or deny these queries. |
|||
| |
|||
*/ |
|||
|
|||
'persisted_queries' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Persisted Queries |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Lighthouse supports Automatic Persisted Queries (APQ), compatible with the |
|||
| [Apollo implementation](https://www.apollographql.com/docs/apollo-server/performance/apq). |
|||
| You may set this flag to either process or deny these queries. |
|||
| |
|||
*/ |
|||
|
|||
'persisted_queries' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Transactional Mutations |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, mutations such as @create or @update will be |
|||
| wrapped in a transaction to ensure atomicity. |
|||
| |
|||
*/ |
|||
|
|||
'transactional_mutations' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Mass Assignment Protection |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, mutations will use forceFill() over fill() when populating |
|||
| a model with arguments in mutation directives. Since GraphQL constrains |
|||
| allowed inputs by design, mass assignment protection is not needed. |
|||
| |
|||
*/ |
|||
|
|||
'force_fill' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Batchload Relations |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, relations marked with directives like @hasMany or @belongsTo |
|||
| will be optimized by combining the queries through the BatchLoader. |
|||
| |
|||
*/ |
|||
|
|||
'batchload_relations' => true, |
|||
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Shortcut Foreign Key Selection |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, Lighthouse will shortcut queries where the client selects only the |
|||
| foreign key pointing to a related model. Only works if the related model's primary |
|||
| key field is called exactly `id` for every type in your schema. |
|||
| |
|||
*/ |
|||
|
|||
'shortcut_foreign_key_selection' => false, |
|||
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Non-Null Pagination Results |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, the generated result type of paginated lists will be marked |
|||
| as non-nullable. This is generally more convenient for clients, but will |
|||
| cause validation errors to bubble further up in the result. |
|||
| |
|||
| This setting will be removed and always behave as if it were true in v6. |
|||
| |
|||
*/ |
|||
|
|||
'non_null_pagination_results' => false, |
|||
|
|||
|
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Unbox BenSampo\Enum\Enum instances |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, Lighthouse will extract the internal $value from instances of |
|||
| BenSampo\Enum\Enum before passing it to ArgBuilderDirective::handleBuilder(). |
|||
| |
|||
| This setting will be removed and always behave as if it were false in v6. |
|||
| |
|||
| It is only here to preserve compatibility, e.g. when expecting the internal |
|||
| value to be passed to a scope when using @scope, but not needed due to Laravel |
|||
| calling the Enum's __toString() method automagically when used in a query. |
|||
| |
|||
*/ |
|||
|
|||
'unbox_bensampo_enum_enum_instances' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Shortcut Foreign Key Selection |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, Lighthouse will shortcut queries where the client selects only the |
|||
| foreign key pointing to a related model. Only works if the related model's primary |
|||
| key field is called exactly `id` for every type in your schema. |
|||
| |
|||
*/ |
|||
|
|||
'shortcut_foreign_key_selection' => false, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Non-Null Pagination Results |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, the generated result type of paginated lists will be marked |
|||
| as non-nullable. This is generally more convenient for clients, but will |
|||
| cause validation errors to bubble further up in the result. |
|||
| |
|||
| This setting will be removed and always behave as if it were true in v6. |
|||
| |
|||
*/ |
|||
|
|||
'non_null_pagination_results' => false, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Unbox BenSampo\Enum\Enum instances |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| If set to true, Lighthouse will extract the internal $value from instances of |
|||
| BenSampo\Enum\Enum before passing it to ArgBuilderDirective::handleBuilder(). |
|||
| |
|||
| This setting will be removed and always behave as if it were false in v6. |
|||
| |
|||
| It is only here to preserve compatibility, e.g. when expecting the internal |
|||
| value to be passed to a scope when using @scope, but not needed due to Laravel |
|||
| calling the Enum's __toString() method automagically when used in a query. |
|||
| |
|||
*/ |
|||
|
|||
'unbox_bensampo_enum_enum_instances' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| GraphQL Subscriptions |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you can define GraphQL subscription broadcaster and storage drivers |
|||
| as well their required configuration options. |
|||
| |
|||
*/ |
|||
|
|||
'subscriptions' => [ |
|||
/* |
|||
* Determines if broadcasts should be queued by default. |
|||
*/ |
|||
'queue_broadcasts' => env('LIGHTHOUSE_QUEUE_BROADCASTS', true), |
|||
|
|||
/* |
|||
* Determines the queue to use for broadcasting queue jobs. |
|||
*/ |
|||
'broadcasts_queue_name' => env('LIGHTHOUSE_BROADCASTS_QUEUE_NAME', null), |
|||
|
|||
/* |
|||
* Default subscription storage. |
|||
* |
|||
* Any Laravel supported cache driver options are available here. |
|||
*/ |
|||
'storage' => env('LIGHTHOUSE_SUBSCRIPTION_STORAGE', 'redis'), |
|||
|
|||
/* |
|||
* Default subscription storage time to live in seconds. |
|||
* |
|||
* Indicates how long a subscription can be active before it's automatically removed from storage. |
|||
* Setting this to `null` means the subscriptions are stored forever. This may cause |
|||
* stale subscriptions to linger indefinitely in case cleanup fails for any reason. |
|||
*/ |
|||
'storage_ttl' => env('LIGHTHOUSE_SUBSCRIPTION_STORAGE_TTL', null), |
|||
|
|||
/* |
|||
* Default subscription broadcaster. |
|||
*/ |
|||
'broadcaster' => env('LIGHTHOUSE_BROADCASTER', 'pusher'), |
|||
|
|||
/* |
|||
* Subscription broadcasting drivers with config options. |
|||
*/ |
|||
'broadcasters' => [ |
|||
'log' => [ |
|||
'driver' => 'log', |
|||
], |
|||
'pusher' => [ |
|||
'driver' => 'pusher', |
|||
'routes' => \Nuwave\Lighthouse\Subscriptions\SubscriptionRouter::class . '@pusher', |
|||
'connection' => 'pusher', |
|||
], |
|||
'echo' => [ |
|||
'driver' => 'echo', |
|||
'connection' => env('LIGHTHOUSE_SUBSCRIPTION_REDIS_CONNECTION', 'default'), |
|||
'routes' => \Nuwave\Lighthouse\Subscriptions\SubscriptionRouter::class . '@echoRoutes', |
|||
], |
|||
], |
|||
|
|||
/* |
|||
* Controls the format of the extensions response. |
|||
* Allowed values: 1, 2 |
|||
*/ |
|||
'version' => env('LIGHTHOUSE_SUBSCRIPTION_VERSION', 1), |
|||
|
|||
/* |
|||
* Should the subscriptions extension be excluded when the response has no subscription channel? |
|||
* This optimizes performance by sending less data, but clients must anticipate this appropriately. |
|||
* Will default to true in v6 and be removed in v7. |
|||
*/ |
|||
'exclude_empty' => env('LIGHTHOUSE_SUBSCRIPTION_EXCLUDE_EMPTY', false), |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Defer |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Configuration for the experimental @defer directive support. |
|||
| |
|||
*/ |
|||
|
|||
'defer' => [ |
|||
/* |
|||
* Maximum number of nested fields that can be deferred in one query. |
|||
* Once reached, remaining fields will be resolved synchronously. |
|||
* 0 means unlimited. |
|||
*/ |
|||
'max_nested_fields' => 0, |
|||
|
|||
/* |
|||
* Maximum execution time for deferred queries in milliseconds. |
|||
* Once reached, remaining fields will be resolved synchronously. |
|||
* 0 means unlimited. |
|||
*/ |
|||
'max_execution_ms' => 0, |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Apollo Federation |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Lighthouse can act as a federated service: https://www.apollographql.com/docs/federation/federation-spec. |
|||
| |
|||
*/ |
|||
|
|||
'federation' => [ |
|||
/* |
|||
* Location of resolver classes when resolving the `_entities` field. |
|||
*/ |
|||
'entities_resolver_namespace' => 'App\\GraphQL\\Entities', |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,215 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
* The disk on which to store added files and derived images by default. Choose |
|||
* one or more of the disks you've configured in config/filesystems.php. |
|||
*/ |
|||
'disk_name' => env('MEDIA_DISK', config('shop.media_disk')), |
|||
|
|||
/* |
|||
* The maximum file size of an item in bytes. |
|||
* Adding a larger file will result in an exception. |
|||
*/ |
|||
'max_file_size' => 1024 * 1024 * 10, |
|||
|
|||
/* |
|||
* This queue will be used to generate derived and responsive images. |
|||
* Leave empty to use the default queue. |
|||
*/ |
|||
'queue_name' => '', |
|||
|
|||
/* |
|||
* By default all conversions will be performed on a queue. |
|||
*/ |
|||
'queue_conversions_by_default' => env('QUEUE_CONVERSIONS_BY_DEFAULT', true), |
|||
|
|||
/* |
|||
* The fully qualified class name of the media model. |
|||
*/ |
|||
'media_model' => Spatie\MediaLibrary\MediaCollections\Models\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, |
|||
|
|||
/* |
|||
* When enabled, Media Library Pro will only process temporary uploads there were uploaded |
|||
* in the same session. You can opt to disable this for stateless usage of |
|||
* the pro components. |
|||
*/ |
|||
'enable_temporary_uploads_session_affinity' => true, |
|||
|
|||
/* |
|||
* When enabled, Media Library pro will generate thumbnails for uploaded file. |
|||
*/ |
|||
'generate_thumbnails_for_temporary_uploads' => true, |
|||
|
|||
/* |
|||
* This is the class that is responsible for naming generated files. |
|||
*/ |
|||
'file_namer' => Spatie\MediaLibrary\Support\FileNamer\DefaultFileNamer::class, |
|||
|
|||
/* |
|||
* The class that contains the strategy for determining a media file's path. |
|||
*/ |
|||
'path_generator' => Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator::class, |
|||
|
|||
/* |
|||
* 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, |
|||
|
|||
/* |
|||
* Moves media on updating to keep path consistent. Enable it only with a custom |
|||
* PathGenerator that uses, for example, the media UUID. |
|||
*/ |
|||
'moves_media_on_update' => false, |
|||
|
|||
/* |
|||
* Whether to activate versioning when urls to files get generated. |
|||
* When activated, this attaches a ?v=xx query string to the URL. |
|||
*/ |
|||
'version_urls' => false, |
|||
|
|||
/* |
|||
* The media library will try to optimize all converted images by removing |
|||
* metadata and applying a little bit of compression. These are |
|||
* the optimizers that will be used by default. |
|||
*/ |
|||
'image_optimizers' => [ |
|||
Spatie\ImageOptimizer\Optimizers\Jpegoptim::class => [ |
|||
'-m85', // set maximum quality to 85%
|
|||
'--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 => [ |
|||
'--force', // required parameter for this package
|
|||
], |
|||
Spatie\ImageOptimizer\Optimizers\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 => [ |
|||
'--disable=cleanupIDs', // disabling because it is known to cause troubles
|
|||
], |
|||
Spatie\ImageOptimizer\Optimizers\Gifsicle::class => [ |
|||
'-b', // required parameter for this package
|
|||
'-O3', // this produces the slowest but best results
|
|||
], |
|||
Spatie\ImageOptimizer\Optimizers\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.
|
|||
], |
|||
], |
|||
|
|||
/* |
|||
* 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, |
|||
], |
|||
|
|||
/* |
|||
* The path where to store temporary files while performing image conversions. |
|||
* If set to null, storage_path('media-library/temp') will be used. |
|||
*/ |
|||
'temporary_directory_path' => null, |
|||
|
|||
/* |
|||
* The engine that should perform the image conversions. |
|||
* Should be either `gd` or `imagick`. |
|||
*/ |
|||
'image_driver' => env('IMAGE_DRIVER', 'gd'), |
|||
|
|||
/* |
|||
* FFMPEG & FFProbe binaries paths, only used if you try to generate video |
|||
* thumbnails and have installed the php-ffmpeg/php-ffmpeg composer |
|||
* dependency. |
|||
*/ |
|||
'ffmpeg_path' => env('FFMPEG_PATH', '/usr/bin/ffmpeg'), |
|||
'ffprobe_path' => env('FFPROBE_PATH', '/usr/bin/ffprobe'), |
|||
|
|||
/* |
|||
* Here you can override the class names of the jobs used by this package. Make sure |
|||
* 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, |
|||
], |
|||
|
|||
/* |
|||
* When using the addMediaFromUrl method you may want to replace the default downloader. |
|||
* 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, |
|||
|
|||
'remote' => [ |
|||
/* |
|||
* Any extra headers that should be included when uploading media to |
|||
* a remote disk. Even though supported headers may vary between |
|||
* different drivers, a sensible default has been provided. |
|||
* |
|||
* Supported by S3: CacheControl, Expires, StorageClass, |
|||
* ServerSideEncryption, Metadata, ACL, ContentEncoding |
|||
*/ |
|||
'extra_headers' => [ |
|||
'CacheControl' => 'max-age=604800', |
|||
], |
|||
], |
|||
|
|||
'responsive_images' => [ |
|||
/* |
|||
* This class is responsible for calculating the target widths of the responsive |
|||
* images. By default we optimize for filesize and create variations that each are 20% |
|||
* smaller than the previous one. More info in the documentation. |
|||
* |
|||
* https://docs.spatie.be/laravel-medialibrary/v9/advanced-usage/generating-responsive-images |
|||
*/ |
|||
'width_calculator' => Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class, |
|||
|
|||
/* |
|||
* By default rendering media to a responsive image will add some javascript and a tiny placeholder. |
|||
* This ensures that the browser can already determine the correct layout. |
|||
*/ |
|||
'use_tiny_placeholders' => true, |
|||
|
|||
/* |
|||
* 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, |
|||
], |
|||
|
|||
/* |
|||
* When enabling this option, a route will be registered that will enable |
|||
* the Media Library Pro Vue and React components to move uploaded files |
|||
* in a S3 bucket to their right place. |
|||
*/ |
|||
'enable_vapor_uploads' => env('ENABLE_MEDIA_LIBRARY_VAPOR_UPLOADS', false), |
|||
|
|||
/* |
|||
* When converting Media instances to response the media library will add |
|||
* a `loading` attribute to the `img` tag. Here you can set the default |
|||
* value of that attribute. |
|||
* |
|||
* Possible values: 'lazy', 'eager', 'auto' or null if you don't want to set any loading instruction. |
|||
* |
|||
* More info: https://css-tricks.com/native-lazy-loading/ |
|||
*/ |
|||
'default_loading_attribute_value' => null, |
|||
]; |
@ -0,0 +1,47 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
* The driver to use to interact with MailChimp API. |
|||
* You may use "log" or "null" to prevent calling the |
|||
* API directly from your environment. |
|||
*/ |
|||
'driver' => env('NEWSLETTER_DRIVER', Spatie\Newsletter\Drivers\MailChimpDriver::class), |
|||
|
|||
/** |
|||
* These arguments will be given to the driver. |
|||
*/ |
|||
'driver_arguments' => [ |
|||
'api_key' => env('NEWSLETTER_API_KEY'), |
|||
|
|||
'endpoint' => env('NEWSLETTER_ENDPOINT'), |
|||
], |
|||
|
|||
/* |
|||
* The list name to use when no list name is specified in a method. |
|||
*/ |
|||
'default_list_name' => 'subscribers', |
|||
|
|||
'lists' => [ |
|||
|
|||
/* |
|||
* This key is used to identify this list. It can be used |
|||
* as the listName parameter provided in the various methods. |
|||
* |
|||
* You can set it to any string you want and you can add |
|||
* as many lists as you want. |
|||
*/ |
|||
'subscribers' => [ |
|||
|
|||
/* |
|||
* When using the Mailcoach driver, this should be Email list UUID |
|||
* which is displayed in the Mailcoach UI |
|||
* |
|||
* When using the MailChimp driver, this should be a MailChimp list id. |
|||
* http://kb.mailchimp.com/lists/managing-subscribers/find-your-list-id. |
|||
*/ |
|||
'id' => env('NEWSLETTER_LIST_ID'), |
|||
], |
|||
], |
|||
]; |
@ -0,0 +1,38 @@ |
|||
<?php |
|||
|
|||
/* |
|||
* This file is part of the Laravel Paystack package. |
|||
* |
|||
* (c) Prosper Otemuyiwa <prosperotemuyiwa@gmail.com> |
|||
* |
|||
* For the full copyright and license information, please view the LICENSE |
|||
* file that was distributed with this source code. |
|||
*/ |
|||
|
|||
return [ |
|||
|
|||
/** |
|||
* Public Key From Paystack Dashboard |
|||
* |
|||
*/ |
|||
'publicKey' => getenv('PAYSTACK_PUBLIC_KEY'), |
|||
|
|||
/** |
|||
* Secret Key From Paystack Dashboard |
|||
* |
|||
*/ |
|||
'secretKey' => getenv('PAYSTACK_SECRET_KEY'), |
|||
|
|||
/** |
|||
* Paystack Payment URL |
|||
* |
|||
*/ |
|||
'paymentUrl' => getenv('PAYSTACK_PAYMENT_URL'), |
|||
|
|||
/** |
|||
* Optional email address of the merchant |
|||
* |
|||
*/ |
|||
'merchantEmail' => getenv('MERCHANT_EMAIL'), |
|||
|
|||
]; |
@ -0,0 +1,187 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
'models' => [ |
|||
|
|||
/* |
|||
* When using the "HasPermissions" trait from this package, we need to know which |
|||
* Eloquent model should be used to retrieve your permissions. Of course, it |
|||
* is often just the "Permission" model but you may use whatever you like. |
|||
* |
|||
* The model you want to use as a Permission model needs to implement the |
|||
* `Spatie\Permission\Contracts\Permission` contract. |
|||
*/ |
|||
|
|||
'permission' => Spatie\Permission\Models\Permission::class, |
|||
|
|||
/* |
|||
* When using the "HasRoles" trait from this package, we need to know which |
|||
* Eloquent model should be used to retrieve your roles. Of course, it |
|||
* is often just the "Role" model but you may use whatever you like. |
|||
* |
|||
* The model you want to use as a Role model needs to implement the |
|||
* `Spatie\Permission\Contracts\Role` contract. |
|||
*/ |
|||
|
|||
'role' => Spatie\Permission\Models\Role::class, |
|||
|
|||
], |
|||
|
|||
'table_names' => [ |
|||
|
|||
/* |
|||
* When using the "HasRoles" trait from this package, we need to know which |
|||
* table should be used to retrieve your roles. We have chosen a basic |
|||
* default value but you may easily change it to any table you like. |
|||
*/ |
|||
|
|||
'roles' => 'roles', |
|||
|
|||
/* |
|||
* When using the "HasPermissions" trait from this package, we need to know which |
|||
* table should be used to retrieve your permissions. We have chosen a basic |
|||
* default value but you may easily change it to any table you like. |
|||
*/ |
|||
|
|||
'permissions' => 'permissions', |
|||
|
|||
/* |
|||
* When using the "HasPermissions" trait from this package, we need to know which |
|||
* table should be used to retrieve your models permissions. We have chosen a |
|||
* basic default value but you may easily change it to any table you like. |
|||
*/ |
|||
|
|||
'model_has_permissions' => 'model_has_permissions', |
|||
|
|||
/* |
|||
* When using the "HasRoles" trait from this package, we need to know which |
|||
* table should be used to retrieve your models roles. We have chosen a |
|||
* basic default value but you may easily change it to any table you like. |
|||
*/ |
|||
|
|||
'model_has_roles' => 'model_has_roles', |
|||
|
|||
/* |
|||
* When using the "HasRoles" trait from this package, we need to know which |
|||
* table should be used to retrieve your roles permissions. We have chosen a |
|||
* basic default value but you may easily change it to any table you like. |
|||
*/ |
|||
|
|||
'role_has_permissions' => 'role_has_permissions', |
|||
], |
|||
|
|||
'column_names' => [ |
|||
/* |
|||
* 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',
|
|||
|
|||
/* |
|||
* Change this if you want to name the related model primary key other than |
|||
* `model_id`. |
|||
* |
|||
* For example, this would be nice if your primary keys are all UUIDs. In |
|||
* that case, name this `model_uuid`. |
|||
*/ |
|||
|
|||
'model_morph_key' => 'model_id', |
|||
|
|||
/* |
|||
* Change this if you want to use the teams feature and your related model's |
|||
* foreign key is other than `team_id`. |
|||
*/ |
|||
|
|||
'team_foreign_key' => 'team_id', |
|||
], |
|||
|
|||
/* |
|||
* When set to true, the method for checking permissions will be registered on the gate. |
|||
* Set this to false if you want to implement custom logic for checking permissions. |
|||
*/ |
|||
|
|||
'register_permission_check_method' => true, |
|||
|
|||
/* |
|||
* When set to true, the Spatie\Permission\Listeners\OctaneReloadPermissions listener will be registered |
|||
* on the Laravel\Octane\Events\OperationTerminated event, this will refresh permissions on every |
|||
* TickTerminated, TaskTerminated and RequestTerminated |
|||
* NOTE: This should not be needed in most cases, but an Octane/Vapor combination benefited from it. |
|||
*/ |
|||
'register_octane_reset_listener' => false, |
|||
|
|||
/* |
|||
* Teams Feature. |
|||
* When set to true the package implements teams using the 'team_foreign_key'. |
|||
* If you want the migrations to register the 'team_foreign_key', you must |
|||
* set this to true before doing the migration. |
|||
* If you already did the migration then you must make a new migration to also |
|||
* add 'team_foreign_key' to 'roles', 'model_has_roles', and 'model_has_permissions' |
|||
* (view the latest version of this package's migration file) |
|||
*/ |
|||
|
|||
'teams' => false, |
|||
|
|||
/* |
|||
* Passport Client Credentials Grant |
|||
* When set to true the package will use Passports Client to check permissions |
|||
*/ |
|||
|
|||
'use_passport_client_credentials' => false, |
|||
|
|||
/* |
|||
* When set to true, the required permission names are added to exception messages. |
|||
* This could be considered an information leak in some contexts, so the default |
|||
* setting is false here for optimum safety. |
|||
*/ |
|||
|
|||
'display_permission_in_exception' => false, |
|||
|
|||
/* |
|||
* When set to true, the required role names are added to exception messages. |
|||
* This could be considered an information leak in some contexts, so the default |
|||
* setting is false here for optimum safety. |
|||
*/ |
|||
|
|||
'display_role_in_exception' => false, |
|||
|
|||
/* |
|||
* By default wildcard permission lookups are disabled. |
|||
* See documentation to understand supported syntax. |
|||
*/ |
|||
|
|||
'enable_wildcard_permission' => false, |
|||
|
|||
/* |
|||
* The class to use for interpreting wildcard permissions. |
|||
* If you need to modify delimiters, override the class and specify its name here. |
|||
*/ |
|||
// 'permission.wildcard_permission' => Spatie\Permission\WildcardPermission::class,
|
|||
|
|||
/* Cache-specific settings */ |
|||
|
|||
'cache' => [ |
|||
|
|||
/* |
|||
* By default all permissions are cached for 24 hours to speed up performance. |
|||
* When permissions or roles are updated the cache is flushed automatically. |
|||
*/ |
|||
|
|||
'expiration_time' => \DateInterval::createFromDateString('24 hours'), |
|||
|
|||
/* |
|||
* The cache key used to store all permissions. |
|||
*/ |
|||
|
|||
'key' => 'spatie.permission.cache', |
|||
|
|||
/* |
|||
* You may optionally indicate a specific cache driver to use for permission and |
|||
* role caching using any of the `store` drivers listed in the cache.php config |
|||
* file. Using 'default' here means to use the `default` set in cache.php. |
|||
*/ |
|||
|
|||
'store' => 'default', |
|||
], |
|||
]; |
@ -0,0 +1,249 @@ |
|||
<?php |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Prettus Repository Config |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| |
|||
*/ |
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Repository Pagination Limit Default |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
*/ |
|||
'pagination' => [ |
|||
'limit' => 15 |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Fractal Presenter Config |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
|
|||
Available serializers: |
|||
ArraySerializer |
|||
DataArraySerializer |
|||
JsonApiSerializer |
|||
|
|||
*/ |
|||
'fractal' => [ |
|||
'params' => [ |
|||
'include' => 'include' |
|||
], |
|||
'serializer' => League\Fractal\Serializer\DataArraySerializer::class |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Config |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
*/ |
|||
'cache' => [ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Status |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Enable or disable cache |
|||
| |
|||
*/ |
|||
'enabled' => false, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Minutes |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Time of expiration cache |
|||
| |
|||
*/ |
|||
'minutes' => 30, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Repository |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Instance of Illuminate\Contracts\Cache\Repository |
|||
| |
|||
*/ |
|||
'repository' => 'cache', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Clean Listener |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| |
|||
| |
|||
*/ |
|||
'clean' => [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Enable clear cache on repository changes |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
*/ |
|||
'enabled' => true, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Actions in Repository |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| create : Clear Cache on create Entry in repository |
|||
| update : Clear Cache on update Entry in repository |
|||
| delete : Clear Cache on delete Entry in repository |
|||
| |
|||
*/ |
|||
'on' => [ |
|||
'create' => true, |
|||
'update' => true, |
|||
'delete' => true, |
|||
] |
|||
], |
|||
|
|||
'params' => [ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Skip Cache Params |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| |
|||
| Ex: http://prettus.local/?search=lorem&skipCache=true |
|||
| |
|||
*/ |
|||
'skipCache' => 'skipCache' |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Methods Allowed |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| methods cacheable : all, paginate, find, findByField, findWhere, getByCriteria |
|||
| |
|||
| Ex: |
|||
| |
|||
| 'only' =>['all','paginate'], |
|||
| |
|||
| or |
|||
| |
|||
| 'except' =>['find'], |
|||
*/ |
|||
'allowed' => [ |
|||
'only' => null, |
|||
'except' => null |
|||
] |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Criteria Config |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Settings of request parameters names that will be used by Criteria |
|||
| |
|||
*/ |
|||
'criteria' => [ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Accepted Conditions |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Conditions accepted in consultations where the Criteria |
|||
| |
|||
| Ex: |
|||
| |
|||
| 'acceptedConditions'=>['=','like'] |
|||
| |
|||
| $query->where('foo','=','bar') |
|||
| $query->where('foo','like','bar') |
|||
| |
|||
*/ |
|||
'acceptedConditions' => [ |
|||
'=', |
|||
'like', |
|||
'in', |
|||
'>=', |
|||
'<=', |
|||
'between' |
|||
], |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Request Params |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Request parameters that will be used to filter the query in the repository |
|||
| |
|||
| Params : |
|||
| |
|||
| - search : Searched value |
|||
| Ex: http://prettus.local/?search=lorem |
|||
| |
|||
| - searchFields : Fields in which research should be carried out |
|||
| Ex: |
|||
| http://prettus.local/?search=lorem&searchFields=name;email |
|||
| http://prettus.local/?search=lorem&searchFields=name:like;email |
|||
| http://prettus.local/?search=lorem&searchFields=name:like |
|||
| |
|||
| - filter : Fields that must be returned to the response object |
|||
| Ex: |
|||
| http://prettus.local/?search=lorem&filter=id,name |
|||
| |
|||
| - orderBy : Order By |
|||
| Ex: |
|||
| http://prettus.local/?search=lorem&orderBy=id |
|||
| |
|||
| - sortedBy : Sort |
|||
| Ex: |
|||
| http://prettus.local/?search=lorem&orderBy=id&sortedBy=asc |
|||
| http://prettus.local/?search=lorem&orderBy=id&sortedBy=desc |
|||
| |
|||
| - searchJoin: Specifies the search method (AND / OR), by default the |
|||
| application searches each parameter with OR |
|||
| EX: |
|||
| http://prettus.local/?search=lorem&searchJoin=and |
|||
| http://prettus.local/?search=lorem&searchJoin=or |
|||
| |
|||
*/ |
|||
'params' => [ |
|||
'search' => 'search', |
|||
'searchFields' => 'searchFields', |
|||
'filter' => 'filter', |
|||
'orderBy' => 'orderBy', |
|||
'sortedBy' => 'sortedBy', |
|||
'with' => 'with', |
|||
'searchJoin' => 'searchJoin', |
|||
'withCount' => 'withCount' |
|||
] |
|||
], |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Generator Config |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
*/ |
|||
'generator' => [ |
|||
'basePath' => app()->path(), |
|||
'rootNamespace' => 'App\\', |
|||
'stubsOverridePath' => app()->path(), |
|||
'paths' => [ |
|||
'models' => 'Entities', |
|||
'repositories' => 'Repositories', |
|||
'interfaces' => 'Repositories', |
|||
'transformers' => 'Transformers', |
|||
'presenters' => 'Presenters', |
|||
'validators' => 'Validators', |
|||
'controllers' => 'Http/Controllers', |
|||
'provider' => 'RepositoryServiceProvider', |
|||
'criteria' => 'Criteria' |
|||
] |
|||
] |
|||
]; |
@ -0,0 +1,48 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Stateful Domains |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Requests from the following domains / hosts will receive stateful API |
|||
| authentication cookies. Typically, these should include your local |
|||
| and production domains which access your API via a frontend SPA. |
|||
| |
|||
*/ |
|||
|
|||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost,127.0.0.1,127.0.0.1:8000,::1')), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Expiration Minutes |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This value controls the number of minutes until an issued token will be |
|||
| considered expired. If this value is null, personal access tokens do |
|||
| not expire. This won't tweak the lifetime of first-party sessions. |
|||
| |
|||
*/ |
|||
|
|||
|
|||
'expiration' => null, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Sanctum Middleware |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When authenticating your first-party SPA with Sanctum you may need to |
|||
| customize some of the middleware Sanctum uses while processing the |
|||
| request. You may change the middleware listed below as required. |
|||
| |
|||
*/ |
|||
|
|||
'middleware' => [ |
|||
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, |
|||
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,91 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Search Engine |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default search connection that gets used while |
|||
| using Laravel Scout. This connection is used when syncing all models |
|||
| to the search service. You should adjust this based on your needs. |
|||
| |
|||
| Supported: "algolia", "null" |
|||
| |
|||
*/ |
|||
|
|||
'driver' => env('SCOUT_DRIVER', 'algolia'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Index Prefix |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify a prefix that will be applied to all search index |
|||
| names used by Scout. This prefix may be useful if you have multiple |
|||
| "tenants" or applications sharing the same search infrastructure. |
|||
| |
|||
*/ |
|||
|
|||
'prefix' => env('SCOUT_PREFIX', ''), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Queue Data Syncing |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option allows you to control if the operations that sync your data |
|||
| with your search engines are queued. When this is set to "true" then |
|||
| all automatic data syncing will get queued for better performance. |
|||
| |
|||
*/ |
|||
|
|||
'queue' => env('SCOUT_QUEUE', true), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Chunk Sizes |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| These options allow you to control the maximum chunk size when you are |
|||
| mass importing data into the search engine. This allows you to fine |
|||
| tune each of these chunk sizes based on the power of the servers. |
|||
| |
|||
*/ |
|||
|
|||
'chunk' => [ |
|||
'searchable' => 500, |
|||
'unsearchable' => 500, |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Soft Deletes |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option allows to control whether to keep soft deleted records in |
|||
| the search indexes. Maintaining soft deleted records can be useful |
|||
| if your application still needs to search for the records later. |
|||
| |
|||
*/ |
|||
|
|||
'soft_delete' => false, |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Algolia Configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may configure your Algolia settings. Algolia is a cloud hosted |
|||
| search engine which works great with Scout out of the box. Just plug |
|||
| in your application ID and admin API key to get started searching. |
|||
| |
|||
*/ |
|||
|
|||
'algolia' => [ |
|||
'id' => env('ALGOLIA_APP_ID', ''), |
|||
'secret' => env('ALGOLIA_SECRET', ''), |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,57 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Third Party Services |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This file is for storing the credentials for third party services such |
|||
| as Mailgun, Postmark, AWS and more. This file provides the de facto |
|||
| location for this type of information, allowing packages to have |
|||
| a conventional file to locate the various service credentials. |
|||
| |
|||
*/ |
|||
|
|||
'mailgun' => [ |
|||
'domain' => env('MAILGUN_DOMAIN'), |
|||
'secret' => env('MAILGUN_SECRET'), |
|||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), |
|||
], |
|||
|
|||
'postmark' => [ |
|||
'token' => env('POSTMARK_TOKEN'), |
|||
], |
|||
|
|||
'ses' => [ |
|||
'key' => env('AWS_ACCESS_KEY_ID'), |
|||
'secret' => env('AWS_SECRET_ACCESS_KEY'), |
|||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), |
|||
], |
|||
|
|||
'google' => [ |
|||
'client_id' => env('GOOGLE_CLIENT_ID'), |
|||
'client_secret' => env('GOOGLE_CLIENT_SECRET'), |
|||
'redirect' => env('GOOGLE_REDIRECT_URI') |
|||
], |
|||
|
|||
'facebook' => [ |
|||
'client_id' => env('FACEBOOK_CLIENT_ID'), |
|||
'client_secret' => env('FACEBOOK_CLIENT_SECRET'), |
|||
'redirect' => env('FACEBOOK_REDIRECT_URI') |
|||
], |
|||
|
|||
'twilio' => [ |
|||
'account_sid' => env('TWILIO_ACCOUNT_SID'), |
|||
'auth_token' => env('TWILIO_AUTH_TOKEN'), |
|||
'verification_sid' => env('TWILIO_VERIFICATION_SID'), |
|||
'from' => env('TWILIO_FROM_NUMBER'), |
|||
], |
|||
|
|||
'messagebird' => [ |
|||
'api_key' => env('MESSAGEBIRD_API_KEY'), |
|||
'originator' => env('MESSAGEBIRD_ORIGINATOR') |
|||
] |
|||
|
|||
]; |
@ -0,0 +1,114 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Admin email configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Set the admin email. This will be used to send email when user contact through contact page. |
|||
| |
|||
*/ |
|||
'admin_email' => env('ADMIN_EMAIL'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Shop url configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Shop url is used in order placed template to go to shop order page. |
|||
| |
|||
*/ |
|||
'shop_url' => env('SHOP_URL'), |
|||
|
|||
'dashboard_url' => env('DASHBOARD_URL'), |
|||
|
|||
'media_disk' => env('MEDIA_DISK'), |
|||
|
|||
'version' => env('APP_VERSION', 12), |
|||
|
|||
'stripe_api_key' => env('STRIPE_API_KEY'), |
|||
|
|||
'app_notice_domain' => env('APP_NOTICE_DOMAIN', 'MARVEL_'), |
|||
|
|||
'dummy_data_path' => env('DUMMY_DATA_PATH', 'pickbazar'), |
|||
|
|||
'default_language' => env('DEFAULT_LANGUAGE', 'en'), |
|||
|
|||
'translation_enabled' => env('TRANSLATION_ENABLED', true), |
|||
|
|||
'default_currency' => env('DEFAULT_CURRENCY', 'USD'), |
|||
|
|||
'active_payment_gateway' => env('ACTIVE_PAYMENT_GATEWAY', 'stripe'), |
|||
|
|||
'razorpay' => [ |
|||
'key_id' => env('RAZORPAY_KEY_ID'), |
|||
'key_secret' => env('RAZORPAY_KEY_SECRET'), |
|||
'webhook_secret' => env('RAZORPAY_WEBHOOK_SECRET_KEY') |
|||
], |
|||
|
|||
'mollie' => [ |
|||
'mollie_key' => env('MOLLIE_KEY'), |
|||
'webhook_url' => env('MOLLIE_WEBHOOK_URL', url('webhooks/mollie')), |
|||
], |
|||
|
|||
'stripe' => [ |
|||
'api_secret' => env('STRIPE_API_KEY'), |
|||
'webhook_secret' => env('STRIPE_WEBHOOK_SECRET_KEY') |
|||
], |
|||
|
|||
'paystack' => [ |
|||
'public_key' => env('PAYSTACK_PUBLIC_KEY'), |
|||
'secret_key' => env('PAYSTACK_SECRET_KEY'), |
|||
], |
|||
|
|||
|
|||
'paypal' => [ |
|||
'mode' => env('PAYPAL_MODE', 'sandbox'), // Can only be 'sandbox' Or 'live'. If empty or invalid, 'live' will be used.
|
|||
'sandbox' => [ |
|||
'client_id' => env('PAYPAL_SANDBOX_CLIENT_ID', ''), |
|||
'client_secret' => env('PAYPAL_SANDBOX_CLIENT_SECRET', ''), |
|||
], |
|||
'live' => [ |
|||
'client_id' => env('PAYPAL_LIVE_CLIENT_ID', ''), |
|||
'client_secret' => env('PAYPAL_LIVE_CLIENT_SECRET', ''), |
|||
], |
|||
'payment_action' => env('PAYPAL_PAYMENT_ACTION', 'Sale'), // Can only be 'Sale', 'Authorization' or 'Order'
|
|||
'webhook_id' => env('PAYPAL_WEBHOOK_ID'), |
|||
'currency' => env('PAYPAL_CURRENCY', 'USD'), |
|||
'notify_url' => env('PAYPAL_NOTIFY_URL', ''), // Change this accordingly for your application.
|
|||
'locale' => env('PAYPAL_LOCALE', 'en_US'), // force gateway language i.e. it_IT, es_ES, en_US ... (for express checkout only)
|
|||
'validate_ssl' => env('PAYPAL_VALIDATE_SSL', true), // Validate SSL when creating api client.
|
|||
], |
|||
|
|||
'sslcommerz' => [ |
|||
'store_id' => env('SSLC_STORE_ID'), |
|||
'store_password' => env('SSLC_STORE_PASSWORD'), |
|||
], |
|||
'iyzico' => [ |
|||
'api_Key' => env('IYZIPAY_API_KEY', ''), |
|||
'secret_Key' => env('IYZIPAY_SECRET_KEY', ''), |
|||
'baseUrl' => env('IYZIPAY_BASE_URL', 'https://sandbox-api.iyzipay.com'), |
|||
], |
|||
'bkash' => [ |
|||
'app_Key' => env('BKASH_APP_KEY', ''), |
|||
'app_secret' => env('BKASH_APP_SECRET', ''), |
|||
'username' => env('BKASH_USERNAME', ''), |
|||
'password' => env('BKASH_PASSWORD', ''), |
|||
'callback_url' => env('BKASH_CALLBACK_URL', 'http://127.0.0.1:8000/bkash/callback'), |
|||
], |
|||
'flutterwave' => [ |
|||
'public_key' => env('FLW_PUBLIC_KEY'), |
|||
'secret_key' => env('FLW_SECRET_KEY'), |
|||
'secret_hash' => env('FLW_SECRET_HASH'), |
|||
], |
|||
|
|||
'openai' => [ |
|||
'secret_Key' => env('OPENAI_SECRET_KEY'), |
|||
], |
|||
|
|||
'pusher' => [ |
|||
'enabled' => env('PUSHER_ENABLED', false), |
|||
] |
|||
]; |
@ -0,0 +1,147 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/** |
|||
* What attributes do we use to build the slug? |
|||
* This can be a single field, like "name" which will build a slug from: |
|||
* |
|||
* $model->name; |
|||
* |
|||
* Or it can be an array of fields, like ["name", "company"], which builds a slug from: |
|||
* |
|||
* $model->name . ' ' . $model->company; |
|||
* |
|||
* If you've defined custom getters in your model, you can use those too, |
|||
* since Eloquent will call them when you request a custom attribute. |
|||
* |
|||
* Defaults to null, which uses the toString() method on your model. |
|||
*/ |
|||
|
|||
'source' => null, |
|||
|
|||
/** |
|||
* The maximum length of a generated slug. Defaults to "null", which means |
|||
* no length restrictions are enforced. Set it to a positive integer if you |
|||
* want to make sure your slugs aren't too long. |
|||
*/ |
|||
|
|||
'maxLength' => null, |
|||
|
|||
/** |
|||
* If you are setting a maximum length on your slugs, you may not want the |
|||
* truncated string to split a word in half. The default setting of "true" |
|||
* will ensure this, e.g. with a maxLength of 12: |
|||
* |
|||
* "my source string" -> "my-source" |
|||
* |
|||
* Setting it to "false" will simply truncate the generated slug at the |
|||
* desired length, e.g.: |
|||
* |
|||
* "my source string" -> "my-source-st" |
|||
*/ |
|||
|
|||
'maxLengthKeepWords' => true, |
|||
|
|||
/** |
|||
* If left to "null", then use the cocur/slugify package to generate the slug |
|||
* (with the separator defined below). |
|||
* |
|||
* Set this to a closure that accepts two parameters (string and separator) |
|||
* to define a custom slugger. e.g.: |
|||
* |
|||
* 'method' => function( $string, $sep ) { |
|||
* return preg_replace('/[^a-z]+/i', $sep, $string); |
|||
* }, |
|||
* |
|||
* Otherwise, this will be treated as a callable to be used. e.g.: |
|||
* |
|||
* 'method' => array('Str','slug'), |
|||
*/ |
|||
|
|||
'method' => null, |
|||
|
|||
/** |
|||
* Separator to use when generating slugs. Defaults to a hyphen. |
|||
*/ |
|||
|
|||
'separator' => '-', |
|||
|
|||
/** |
|||
* Enforce uniqueness of slugs? Defaults to true. |
|||
* If a generated slug already exists, an incremental numeric |
|||
* value will be appended to the end until a unique slug is found. e.g.: |
|||
* |
|||
* my-slug |
|||
* my-slug-1 |
|||
* my-slug-2 |
|||
*/ |
|||
|
|||
'unique' => true, |
|||
|
|||
/** |
|||
* If you are enforcing unique slugs, the default is to add an |
|||
* incremental value to the end of the base slug. Alternatively, you |
|||
* can change this value to a closure that accepts three parameters: |
|||
* the base slug, the separator, and a Collection of the other |
|||
* "similar" slugs. The closure should return the new unique |
|||
* suffix to append to the slug. |
|||
*/ |
|||
|
|||
'uniqueSuffix' => null, |
|||
|
|||
/** |
|||
* Should we include the trashed items when generating a unique slug? |
|||
* This only applies if the softDelete property is set for the Eloquent model. |
|||
* If set to "false", then a new slug could duplicate one that exists on a trashed model. |
|||
* If set to "true", then uniqueness is enforced across trashed and existing models. |
|||
*/ |
|||
|
|||
'includeTrashed' => false, |
|||
|
|||
/** |
|||
* An array of slug names that can never be used for this model, |
|||
* e.g. to prevent collisions with existing routes or controller methods, etc.. |
|||
* Defaults to null (i.e. no reserved names). |
|||
* Can be a static array, e.g.: |
|||
* |
|||
* 'reserved' => array('add', 'delete'), |
|||
* |
|||
* or a closure that returns an array of reserved names. |
|||
* If using a closure, it will accept one parameter: the model itself, and should |
|||
* return an array of reserved names, or null. e.g. |
|||
* |
|||
* 'reserved' => function( Model $model) { |
|||
* return $model->some_method_that_returns_an_array(); |
|||
* } |
|||
* |
|||
* In the case of a slug that gets generated with one of these reserved names, |
|||
* we will do: |
|||
* |
|||
* $slug .= $separator + "1" |
|||
* |
|||
* and continue from there. |
|||
*/ |
|||
|
|||
'reserved' => null, |
|||
|
|||
/** |
|||
* Whether to update the slug value when a model is being |
|||
* re-saved (i.e. already exists). Defaults to false, which |
|||
* means slugs are not updated. |
|||
* |
|||
* Be careful! If you are using slugs to generate URLs, then |
|||
* updating your slug automatically might change your URLs which |
|||
* is probably not a good idea from an SEO point of view. |
|||
* Only set this to true if you understand the possible consequences. |
|||
*/ |
|||
|
|||
'onUpdate' => false, |
|||
|
|||
/** |
|||
* If the default slug engine of cocur/slugify is used, this array of |
|||
* configuration options will be used when instantiating the engine. |
|||
*/ |
|||
'slugEngineOptions' => [], |
|||
|
|||
]; |
@ -0,0 +1,133 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/** |
|||
* SANDBOX MODE |
|||
* -------------------------------- |
|||
* By default it is binded with APP_DEBUG |
|||
* If app.debug is true, sandbox is also true |
|||
* |
|||
*/ |
|||
|
|||
'sandbox' => env('APP_DEBUG', true), |
|||
|
|||
/** |
|||
* CREDENTIALS |
|||
* -------------------------------- |
|||
* The API credentials given from SSLCommerz |
|||
* |
|||
*/ |
|||
|
|||
'store' => [ |
|||
'id' => env('SSLC_STORE_ID'), |
|||
'password' => env('SSLC_STORE_PASSWORD'), |
|||
'currency' => env('DEFAULT_CURRENCY','USD'), |
|||
], |
|||
|
|||
/** |
|||
* REDIRECT URL's |
|||
* -------------------------------- |
|||
* The URL Redirection after success/failure/cancel |
|||
* USE route name() |
|||
* DO NOT USE route url() |
|||
*/ |
|||
|
|||
'route' => [ |
|||
'success' => env('SSLC_ROUTE_SUCCESS','sslc.sslcommerz'), |
|||
'failure' => env('SSLC_ROUTE_FAILURE','sslc.sslcommerz'), |
|||
'cancel' => env('SSLC_ROUTE_CANCEL','sslc.sslcommerz'), |
|||
'ipn' => env('SSLC_ROUTE_IPN','sslc.sslcommerz'), |
|||
], |
|||
|
|||
/** |
|||
* STRICT PAYMENT GATEWAY |
|||
* -------------------------------- |
|||
* Strict your payment gateway. Leave is NULL if |
|||
* you want to enable all available gateways |
|||
* |
|||
* List of gateways |
|||
* brac_visa= BRAC VISA |
|||
* dbbl_visa= Dutch Bangla VISA |
|||
* city_visa= City Bank Visa |
|||
* ebl_visa = EBL Visa |
|||
* sbl_visa = Southeast Bank Visa |
|||
* brac_master = BRAC MASTER |
|||
* dbbl_master = MASTER Dutch-Bangla |
|||
* city_master = City Master Card |
|||
* ebl_maste= EBL Master Card |
|||
* sbl_maste= Southeast Bank Master Card |
|||
* city_amex= City Bank AMEX |
|||
* qcash= QCash |
|||
* dbbl_nexu= DBBL Nexus |
|||
* bankasia = Bank Asia IB |
|||
* abban= AB Bank IB |
|||
* ibbl = IBBL IB and Mobile Banking |
|||
* mtbl = Mutual Trust Bank IB |
|||
* bkash= Bkash Mobile Banking |
|||
* dbblmobilebanking= DBBL Mobile Banking |
|||
* city = City Touch IB |
|||
* upay = Upay |
|||
* tapnpay = Tap N Pay Gateway |
|||
* |
|||
* GROUP GATEWAY |
|||
* internetbank = For all internet banking |
|||
* mobileban= For all mobile banking |
|||
* othercard= For all cards except visa,master and amex |
|||
* visacard = For all visa |
|||
* mastercar= For All Master card |
|||
* amexcard = For Amex Card |
|||
*/ |
|||
|
|||
'gateway' => null, |
|||
|
|||
/** |
|||
* DEFAULT SYSTEM PRODUCT PROFILE |
|||
* -------------------------------- |
|||
* Product profile required from SSLC |
|||
* By default it is "general" |
|||
* |
|||
* AVAILABLE PROFILES |
|||
* general |
|||
* physical-goods |
|||
* non-physical-goods |
|||
* airline-tickets |
|||
* travel-vertical |
|||
* telecom-vertical |
|||
* |
|||
*/ |
|||
|
|||
'product_profile' => 'general', |
|||
|
|||
/** |
|||
* ALLOW FROM LOCALHOST |
|||
* -------------------------------- |
|||
* Set TRUE if you are in development mode, |
|||
* or you have localhost based application, |
|||
* otherwise FALSE in production |
|||
*/ |
|||
|
|||
'localhost' => env('SSLC_ALLOW_LOCALHOST',true), |
|||
|
|||
/** |
|||
* PATHS |
|||
* -------------------------------- |
|||
* Default paths of the sslcommerz system |
|||
* Do not change if necessary |
|||
* |
|||
*/ |
|||
|
|||
'path' => [ |
|||
'domain' => [ |
|||
'sandbox' => 'https://sandbox.sslcommerz.com', |
|||
'live' => 'https://securepay.sslcommerz.com' |
|||
], |
|||
'endpoint' => [ |
|||
'make_payment' => '/gwprocess/v4/api.php', |
|||
'transaction_status' => '/validator/api/merchantTransIDvalidationAPI.php', |
|||
'order_validate' => '/validator/api/validationserverAPI.php', |
|||
'refund_payment' => '/validator/api/merchantTransIDvalidationAPI.php', |
|||
'refund_status' => '/validator/api/merchantTransIDvalidationAPI.php', |
|||
] |
|||
] |
|||
]; |
@ -0,0 +1,114 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Facades\Schema; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Database\Migrations\Migration; |
|||
|
|||
class CreatePermissionTables extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
$tableNames = config('permission.table_names'); |
|||
$columnNames = config('permission.column_names'); |
|||
|
|||
if (empty($tableNames)) { |
|||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding.'); |
|||
} |
|||
|
|||
Schema::create($tableNames['permissions'], function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->string('name'); |
|||
$table->string('guard_name'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create($tableNames['roles'], function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->string('name'); |
|||
$table->string('guard_name'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) { |
|||
$table->unsignedBigInteger('permission_id'); |
|||
|
|||
$table->string('model_type'); |
|||
$table->unsignedBigInteger($columnNames['model_morph_key']); |
|||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); |
|||
|
|||
$table->foreign('permission_id') |
|||
->references('id') |
|||
->on($tableNames['permissions']) |
|||
->onDelete('cascade'); |
|||
|
|||
$table->primary( |
|||
['permission_id', $columnNames['model_morph_key'], 'model_type'], |
|||
'model_has_permissions_permission_model_type_primary' |
|||
); |
|||
}); |
|||
|
|||
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) { |
|||
$table->unsignedBigInteger('role_id'); |
|||
|
|||
$table->string('model_type'); |
|||
$table->unsignedBigInteger($columnNames['model_morph_key']); |
|||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); |
|||
|
|||
$table->foreign('role_id') |
|||
->references('id') |
|||
->on($tableNames['roles']) |
|||
->onDelete('cascade'); |
|||
|
|||
$table->primary( |
|||
['role_id', $columnNames['model_morph_key'], 'model_type'], |
|||
'model_has_roles_role_model_type_primary' |
|||
); |
|||
}); |
|||
|
|||
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { |
|||
$table->unsignedBigInteger('permission_id'); |
|||
$table->unsignedBigInteger('role_id'); |
|||
|
|||
$table->foreign('permission_id') |
|||
->references('id') |
|||
->on($tableNames['permissions']) |
|||
->onDelete('cascade'); |
|||
|
|||
$table->foreign('role_id') |
|||
->references('id') |
|||
->on($tableNames['roles']) |
|||
->onDelete('cascade'); |
|||
|
|||
$table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary'); |
|||
}); |
|||
|
|||
app('cache') |
|||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) |
|||
->forget(config('permission.cache.key')); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
$tableNames = config('permission.table_names'); |
|||
|
|||
if (empty($tableNames)) { |
|||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); |
|||
} |
|||
|
|||
Schema::drop($tableNames['role_has_permissions']); |
|||
Schema::drop($tableNames['model_has_roles']); |
|||
Schema::drop($tableNames['model_has_permissions']); |
|||
Schema::drop($tableNames['roles']); |
|||
Schema::drop($tableNames['permissions']); |
|||
} |
|||
} |
@ -0,0 +1,280 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
use Marvel\Enums\CouponType; |
|||
use Marvel\Enums\OrderStatus; |
|||
use Marvel\Enums\PaymentStatus; |
|||
use Marvel\Enums\ProductStatus; |
|||
use Marvel\Enums\ProductType; |
|||
use Marvel\Enums\ShippingType; |
|||
|
|||
class CreateMarvelTables extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('shipping_classes', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->double('amount'); |
|||
$table->string('is_global')->default(true); |
|||
$table->enum('type', ShippingType::getValues())->default(ShippingType::FIXED); |
|||
$table->timestamps(); |
|||
}); |
|||
Schema::create('coupons', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('code'); |
|||
$table->text('description')->nullable(); |
|||
$table->json('image')->nullable(); |
|||
$table->enum('type', CouponType::getValues())->default(CouponType::DEFAULT_COUPON); |
|||
$table->float('amount')->default(0); |
|||
$table->float('minimum_cart_amount')->default(0); |
|||
$table->string('active_from'); |
|||
$table->string('expire_at'); |
|||
$table->timestamps(); |
|||
$table->timestamp('deleted_at')->nullable(); |
|||
}); |
|||
|
|||
Schema::create('types', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->string('slug'); |
|||
$table->string('icon')->nullable(); |
|||
$table->json('promotional_sliders')->nullable(); |
|||
$table->json('images')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('authors', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->boolean('is_approved')->default(false); |
|||
$table->json('image')->nullable(); |
|||
$table->json('cover_image')->nullable(); |
|||
$table->string('slug'); |
|||
$table->text('bio')->nullable(); |
|||
$table->text('quote')->nullable(); |
|||
$table->string('born')->nullable(); |
|||
$table->string('death')->nullable(); |
|||
$table->string('languages')->nullable(); |
|||
$table->json('socials')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('manufacturers', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->boolean('is_approved')->default(false); |
|||
$table->json('image')->nullable(); |
|||
$table->json('cover_image')->nullable(); |
|||
$table->string('slug'); |
|||
$table->unsignedBigInteger('type_id'); |
|||
$table->foreign('type_id')->references('id')->on('types')->onDelete('cascade'); |
|||
$table->text('description')->nullable(); |
|||
$table->string('website')->nullable(); |
|||
$table->json('socials')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('products', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->string('slug'); |
|||
$table->text('description')->nullable(); |
|||
$table->unsignedBigInteger('type_id'); |
|||
$table->foreign('type_id')->references('id')->on('types')->onDelete('cascade'); |
|||
$table->double('price')->nullable(); |
|||
$table->double('sale_price')->nullable(); |
|||
$table->string('sku')->nullable(); |
|||
$table->integer('quantity')->default(0); |
|||
$table->boolean('in_stock')->default(true); |
|||
$table->boolean('is_taxable')->default(false); |
|||
$table->unsignedBigInteger('shipping_class_id')->nullable(); |
|||
$table->foreign('shipping_class_id')->references('id')->on('shipping_classes'); |
|||
$table->enum('status', ProductStatus::getValues())->default(ProductStatus::DRAFT); |
|||
$table->enum('product_type', ProductType::getValues())->default(ProductType::SIMPLE); |
|||
$table->string('unit'); |
|||
$table->string('height')->nullable(); |
|||
$table->string('width')->nullable(); |
|||
$table->string('length')->nullable(); |
|||
$table->json('image')->nullable(); |
|||
$table->json('gallery')->nullable(); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
Schema::create('orders', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('tracking_number')->unique(); |
|||
$table->unsignedBigInteger('customer_id')->nullable(); |
|||
$table->string('customer_contact'); |
|||
$table->string('customer_name')->nullable(); |
|||
$table->double('amount'); |
|||
$table->double('sales_tax')->nullable(); |
|||
$table->double('paid_total')->nullable(); |
|||
$table->double('total')->nullable(); |
|||
$table->unsignedBigInteger('coupon_id')->nullable(); |
|||
$table->double('discount')->nullable(); |
|||
$table->string('payment_gateway')->nullable(); |
|||
$table->string('altered_payment_gateway')->nullable(); |
|||
$table->json('shipping_address')->nullable(); |
|||
$table->json('billing_address')->nullable(); |
|||
$table->unsignedBigInteger('logistics_provider')->nullable(); |
|||
$table->double('delivery_fee')->nullable(); |
|||
$table->string('delivery_time')->nullable(); |
|||
$table->enum('order_status', OrderStatus::getValues())->default(OrderStatus::DEFAULT_ORDER_STATUS); |
|||
$table->enum('payment_status', PaymentStatus::getValues())->default(PaymentStatus::DEFAULT_PAYMENT_STATUS); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
$table->foreign('customer_id')->references('id')->on('users'); |
|||
}); |
|||
|
|||
Schema::create('order_product', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('order_id'); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->string('order_quantity'); |
|||
$table->double('unit_price'); |
|||
$table->double('subtotal'); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('categories', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->string('slug'); |
|||
$table->string('icon')->nullable(); |
|||
$table->json('image')->nullable(); |
|||
$table->json('banner_image')->nullable(); |
|||
$table->text('details')->nullable(); |
|||
$table->unsignedBigInteger('parent')->nullable(); |
|||
$table->foreign('parent')->references('id')->on('categories')->onDelete('cascade'); |
|||
// $table->unsignedBigInteger('type_id');
|
|||
// $table->foreign('type_id')->references('id')->on('types')->onDelete('cascade');
|
|||
$table->timestamps(); |
|||
$table->softDeletes(); |
|||
}); |
|||
|
|||
Schema::create('category_product', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->unsignedBigInteger('category_id'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('attributes', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('slug'); |
|||
$table->string('name'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('attribute_values', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('slug'); |
|||
$table->unsignedBigInteger('attribute_id'); |
|||
$table->foreign('attribute_id')->references('id')->on('attributes')->onDelete('cascade'); |
|||
$table->string('value'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('attribute_product', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('attribute_value_id'); |
|||
$table->foreign('attribute_value_id')->references('id')->on('attribute_values')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('tax_classes', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('country')->nullable(); |
|||
$table->string('state')->nullable(); |
|||
$table->string('zip')->nullable(); |
|||
$table->string('city')->nullable(); |
|||
$table->double('rate'); |
|||
$table->string('name')->nullable(); |
|||
$table->integer('is_global')->nullable(); |
|||
$table->integer('priority')->nullable(); |
|||
$table->boolean('on_shipping')->default(1); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('address', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('title'); |
|||
$table->string('type'); |
|||
$table->boolean('default')->default(false); |
|||
$table->json('address'); |
|||
$table->json('location')->nullable(); |
|||
$table->unsignedBigInteger('customer_id'); |
|||
$table->foreign('customer_id')->references('id')->on('users'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('settings', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->json('options'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('user_profiles', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->json('avatar')->nullable(); |
|||
$table->text('bio')->nullable(); |
|||
$table->json('socials')->nullable(); |
|||
$table->string('contact')->nullable(); |
|||
$table->unsignedBigInteger('customer_id'); |
|||
$table->foreign('customer_id')->references('id')->on('users'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::table('users', function (Blueprint $table) { |
|||
$table->boolean('is_active')->default(1); |
|||
}); |
|||
|
|||
Schema::create('attachments', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('url')->default(''); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('shipping_classes'); |
|||
Schema::dropIfExists('shipping_classes'); |
|||
Schema::dropIfExists('coupons'); |
|||
Schema::dropIfExists('types'); |
|||
Schema::dropIfExists('products'); |
|||
Schema::dropIfExists('orders'); |
|||
Schema::dropIfExists('order_product'); |
|||
Schema::dropIfExists('categories'); |
|||
Schema::dropIfExists('category_product'); |
|||
Schema::dropIfExists('attributes'); |
|||
Schema::dropIfExists('attribute_values'); |
|||
Schema::dropIfExists('attribute_product'); |
|||
Schema::dropIfExists('tax_classes'); |
|||
Schema::dropIfExists('address'); |
|||
Schema::dropIfExists('settings'); |
|||
Schema::dropIfExists('user_profiles'); |
|||
Schema::dropIfExists('attachments'); |
|||
Schema::dropIfExists('authors'); |
|||
Schema::dropIfExists('manufacturers'); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Facades\Schema; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Database\Migrations\Migration; |
|||
|
|||
class CreateMediaTable extends Migration |
|||
{ |
|||
public function up() |
|||
{ |
|||
Schema::create('media', function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
|
|||
$table->morphs('model'); |
|||
$table->uuid('uuid')->nullable(); |
|||
$table->string('collection_name'); |
|||
$table->string('name'); |
|||
$table->string('file_name'); |
|||
$table->string('mime_type')->nullable(); |
|||
$table->string('disk'); |
|||
$table->string('conversions_disk')->nullable(); |
|||
$table->unsignedBigInteger('size'); |
|||
$table->json('manipulations'); |
|||
$table->json('generated_conversions'); |
|||
$table->json('custom_properties'); |
|||
$table->json('responsive_images'); |
|||
$table->unsignedInteger('order_column')->nullable(); |
|||
|
|||
$table->nullableTimestamps(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('media'); |
|||
} |
|||
} |
@ -0,0 +1,226 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
use Marvel\Enums\WithdrawStatus; |
|||
|
|||
class CreateNewMarvelTables extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('variation_options', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('title'); |
|||
$table->string('price'); |
|||
$table->string('sale_price')->nullable(); |
|||
$table->unsignedBigInteger('quantity'); |
|||
$table->boolean('is_disable')->default(false); |
|||
$table->string('sku')->nullable(); |
|||
$table->json('options'); |
|||
$table->unsignedBigInteger('product_id')->nullable(); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('tags', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->string('slug'); |
|||
$table->string('icon')->nullable(); |
|||
$table->json('image')->nullable(); |
|||
$table->text('details')->nullable(); |
|||
$table->timestamps(); |
|||
$table->softDeletes(); |
|||
}); |
|||
|
|||
Schema::create('product_tag', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->unsignedBigInteger('tag_id'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade'); |
|||
}); |
|||
Schema::table('products', function (Blueprint $table) { |
|||
$table->float('min_price')->after('sale_price')->nullable(); |
|||
$table->float('max_price')->after('min_price')->nullable(); |
|||
$table->json('video')->after('image')->nullable(); |
|||
}); |
|||
|
|||
Schema::table('order_product', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('variation_option_id')->after('product_id')->nullable(); |
|||
$table->foreign('variation_option_id')->references('id')->on('variation_options'); |
|||
}); |
|||
|
|||
Schema::create('shops', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('owner_id'); |
|||
$table->foreign('owner_id')->references('id')->on('users'); |
|||
$table->string('name')->nullable(); |
|||
$table->string('slug')->nullable(); |
|||
$table->text('description')->nullable(); |
|||
$table->json('cover_image')->nullable(); |
|||
$table->json('logo')->nullable(); |
|||
$table->boolean('is_active')->default(false); |
|||
$table->json('address')->nullable(); |
|||
$table->json('settings')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
Schema::create('balances', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->double('admin_commission_rate')->nullable(); |
|||
$table->double('total_earnings')->default(0); |
|||
$table->double('withdrawn_amount')->default(0); |
|||
$table->double('current_balance')->default(0); |
|||
$table->json('payment_info')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::table('users', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('shop_id')->nullable(); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('user_shop', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('category_shop', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->unsignedBigInteger('category_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('withdraws', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->float('amount'); |
|||
$table->string('payment_method')->nullable(); |
|||
$table->enum('status', WithdrawStatus::getValues())->default(WithdrawStatus::PENDING); |
|||
$table->text('details')->nullable(); |
|||
$table->text('note')->nullable(); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::table('attributes', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('shop_id')->nullable()->after('name'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::table('attribute_values', function (Blueprint $table) { |
|||
$table->string('meta')->after('value')->nullable(); |
|||
}); |
|||
|
|||
Schema::table('types', function (Blueprint $table) { |
|||
$table->json('settings')->after('name')->nullable(); |
|||
}); |
|||
|
|||
Schema::table('products', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('shop_id')->after('price')->nullable(); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
}); |
|||
Schema::table('orders', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('shop_id')->after('coupon_id')->nullable(); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('parent_id')->after('coupon_id')->nullable(); |
|||
$table->foreign('parent_id')->references('id')->on('orders')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::table('users', function (Blueprint $table) { |
|||
$table->string('password')->nullable()->change(); |
|||
}); |
|||
|
|||
Schema::create('providers', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->string('provider_user_id'); |
|||
$table->string('provider'); |
|||
$table->timestamps(); |
|||
|
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('banners', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('type_id'); |
|||
$table->text('title'); |
|||
$table->text('description')->nullable(); |
|||
$table->json('image')->nullable(); |
|||
$table->timestamps(); |
|||
$table->foreign('type_id')->references('id')->on('types')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('payment_gateways', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->string('customer_id'); |
|||
$table->string('gateway_name')->nullable(); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
|
|||
Schema::create('payment_methods', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('method_key')->unique(); |
|||
$table->unsignedBigInteger('payment_gateway_id')->nullable(); |
|||
$table->boolean('default_card')->nullable()->default(false); |
|||
$table->string('fingerprint')->unique(); |
|||
$table->string('owner_name')->nullable(); |
|||
$table->string('network')->nullable(); |
|||
$table->string('type')->nullable(); |
|||
$table->string('last4')->nullable(); |
|||
$table->string('expires')->nullable(); |
|||
$table->string('origin')->nullable(); |
|||
$table->string('verification_check')->nullable(); |
|||
$table->foreign('payment_gateway_id')->references('id')->on('payment_gateways')->onDelete('cascade'); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
|
|||
Schema::create('payment_intents', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('order_id')->nullable(); |
|||
$table->string('tracking_number')->nullable(); |
|||
$table->string('payment_gateway')->nullable(); |
|||
$table->json('payment_intent_info')->nullable(); |
|||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade'); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('withdraws'); |
|||
Schema::dropIfExists('store_settings'); |
|||
Schema::dropIfExists('variation_options'); |
|||
Schema::dropIfExists('product_tag'); |
|||
Schema::dropIfExists('tags'); |
|||
Schema::dropIfExists('payment_gateways'); |
|||
Schema::dropIfExists('cards'); |
|||
Schema::dropIfExists('payment_intents'); |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
use Marvel\Enums\RefundStatus; |
|||
|
|||
class CreateWalletTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('wallets', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->double('total_points')->default(0); |
|||
$table->double('points_used')->default(0); |
|||
$table->double('available_points')->default(0); |
|||
$table->unsignedBigInteger('customer_id')->nullable(); |
|||
$table->foreign('customer_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('order_wallet_points', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->double('amount')->nullable(); |
|||
$table->unsignedBigInteger('order_id')->nullable(); |
|||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('refunds', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->double('amount')->default(0); |
|||
$table->enum('status',RefundStatus::getValues())->default(RefundStatus::PENDING); |
|||
$table->string('title')->nullable(); |
|||
$table->text('description')->nullable(); |
|||
$table->json('images')->nullable(); |
|||
$table->unsignedBigInteger('order_id')->nullable(); |
|||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('customer_id')->nullable(); |
|||
$table->foreign('customer_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('shop_id')->nullable(); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('wallets'); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateProductTypeTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::table('products', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('author_id')->nullable(); |
|||
$table->foreign('author_id')->references('id')->on('authors')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('manufacturer_id')->nullable(); |
|||
$table->foreign('manufacturer_id')->references('id')->on('manufacturers')->onDelete('cascade'); |
|||
$table->boolean('is_digital')->default(0); |
|||
$table->boolean('is_external')->default(0); |
|||
$table->string('external_product_url')->nullable(); |
|||
$table->string('external_product_button_text')->nullable(); |
|||
$table->string('blocked_dates')->nullable(); |
|||
}); |
|||
|
|||
Schema::create('digital_files', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('attachment_id'); |
|||
$table->string('url'); |
|||
$table->string('file_name'); |
|||
$table->string('fileable_type'); |
|||
$table->unsignedBigInteger('fileable_id'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('ordered_files', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('purchase_key'); |
|||
$table->unsignedBigInteger('digital_file_id'); |
|||
$table->foreign('digital_file_id')->references('id')->on('digital_files')->onDelete('cascade'); |
|||
$table->string('tracking_number')->nullable(); |
|||
$table->foreign('tracking_number')->references('tracking_number')->on('orders')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('customer_id'); |
|||
$table->foreign('customer_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('download_tokens', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('token'); |
|||
$table->unsignedBigInteger('digital_file_id')->nullable(); |
|||
$table->text('payload')->nullable(); |
|||
$table->foreign('digital_file_id')->references('id')->on('digital_files')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::table('variation_options', function (Blueprint $table) { |
|||
$table->json('image')->after('title')->nullable(); |
|||
$table->boolean('is_digital')->default(0); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('digital_files'); |
|||
Schema::dropIfExists('download_tokens'); |
|||
Schema::dropIfExists('ordered_files'); |
|||
} |
|||
} |
@ -0,0 +1,88 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateReviewsTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('reviews', function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->longText('comment'); |
|||
$table->double('rating')->nullable(); |
|||
$table->json('photos')->nullable(); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('questions', function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->text('question'); |
|||
$table->text('answer')->nullable(); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('feedbacks', function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->morphs('model'); |
|||
$table->boolean('positive')->nullable(); |
|||
$table->boolean('negative')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('abusive_reports', function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->morphs('model'); |
|||
$table->text('message'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('wishlists', function (Blueprint $table) { |
|||
$table->bigIncrements('id'); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('reviews'); |
|||
Schema::dropIfExists('questions'); |
|||
Schema::dropIfExists('feedbacks'); |
|||
Schema::dropIfExists('abusive_reports'); |
|||
Schema::dropIfExists('wishlists'); |
|||
} |
|||
} |
@ -0,0 +1,104 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
use Marvel\Enums\ResourceType; |
|||
|
|||
class CreateRentalTables extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
|
|||
Schema::create('products_meta', function (Blueprint $table) { |
|||
$table->increments('id'); |
|||
$table->unsignedBigInteger('product_id'); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->string('type')->default('null'); |
|||
$table->string('key')->index(); |
|||
$table->text('value')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
|
|||
Schema::create('availabilities', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('from'); |
|||
$table->string('to'); |
|||
$table->string('booking_duration'); |
|||
$table->integer('order_quantity'); |
|||
$table->string('bookable_type'); |
|||
$table->unsignedBigInteger('bookable_id'); |
|||
$table->unsignedBigInteger('order_id')->nullable(); |
|||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id')->nullable(); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('resources', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('name'); |
|||
$table->string('slug'); |
|||
$table->string('icon')->nullable(); |
|||
$table->text('details')->nullable(); |
|||
$table->json('image')->nullable(); |
|||
$table->boolean('is_approved')->default(false); |
|||
$table->double('price')->nullable(); |
|||
$table->enum('type', ResourceType::getValues()); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('dropoff_location_product', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('resource_id')->nullable(); |
|||
$table->foreign('resource_id')->references('id')->on('resources')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id')->nullable(); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('pickup_location_product', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('resource_id')->nullable(); |
|||
$table->foreign('resource_id')->references('id')->on('resources')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id')->nullable(); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('feature_product', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('resource_id')->nullable(); |
|||
$table->foreign('resource_id')->references('id')->on('resources')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id')->nullable(); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
}); |
|||
Schema::create('deposit_product', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('resource_id')->nullable(); |
|||
$table->foreign('resource_id')->references('id')->on('resources')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id')->nullable(); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::create('person_product', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('resource_id')->nullable(); |
|||
$table->foreign('resource_id')->references('id')->on('resources')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('product_id')->nullable(); |
|||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('availabilities'); |
|||
Schema::dropIfExists('products_meta'); |
|||
Schema::dropIfExists('locations'); |
|||
Schema::dropIfExists('location_product'); |
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateMarvelLanguagesTables extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
|
|||
if (TRANSLATION_ENABLED) { |
|||
Schema::create('languages', function (Blueprint $table) { |
|||
$table->increments('id'); |
|||
$table->json('flag'); |
|||
$table->string('language_code'); |
|||
$table->string('language_name'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('translations', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->string('item_type'); |
|||
$table->unsignedBigInteger('item_id'); // this is the translated item id
|
|||
$table->unsignedBigInteger('translation_item_id')->nullable(); // this is the main element id
|
|||
$table->string('language_code'); |
|||
$table->string('source_language_code')->default(DEFAULT_LANGUAGE); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
|
|||
Schema::table('products', function (Blueprint $table) { |
|||
$table->string('language')->after('sale_price')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('categories', function (Blueprint $table) { |
|||
$table->string('language')->after('slug')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('tags', function (Blueprint $table) { |
|||
$table->string('language')->after('slug')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('authors', function (Blueprint $table) { |
|||
$table->string('language')->after('slug')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('manufacturers', function (Blueprint $table) { |
|||
$table->string('language')->after('slug')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('resources', function (Blueprint $table) { |
|||
$table->string('language')->after('slug')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('types', function (Blueprint $table) { |
|||
$table->string('language')->after('slug')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('attributes', function (Blueprint $table) { |
|||
$table->string('language')->after('slug')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('attribute_values', function (Blueprint $table) { |
|||
$table->string('language')->after('value')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('availabilities', function (Blueprint $table) { |
|||
$table->string('language')->after('to')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('coupons', function (Blueprint $table) { |
|||
$table->string('language')->after('code')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('orders', function (Blueprint $table) { |
|||
$table->string('language')->after('total')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
// Schema::table('order_status', function (Blueprint $table) {
|
|||
// $table->string('language')->after('serial')->default(DEFAULT_LANGUAGE);
|
|||
// });
|
|||
Schema::table('variation_options', function (Blueprint $table) { |
|||
$table->string('language')->after('sale_price')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
Schema::table('settings', function (Blueprint $table) { |
|||
$table->string('language')->unique()->after('options')->default(DEFAULT_LANGUAGE); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('languages'); |
|||
Schema::dropIfExists('translations'); |
|||
} |
|||
} |
@ -0,0 +1,37 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateMarvelDeliveryTimeTables extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
|
|||
Schema::create('delivery_times', function (Blueprint $table) { |
|||
$table->increments('id'); |
|||
$table->string('title'); |
|||
$table->string('slug'); |
|||
$table->string('icon'); |
|||
$table->text('description')->nullable(); |
|||
$table->string('language')->default(DEFAULT_LANGUAGE); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('delivery_times'); |
|||
} |
|||
} |
@ -0,0 +1,59 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
use Marvel\Enums\StoreNoticePriority; |
|||
use Marvel\Enums\StoreNoticeType; |
|||
|
|||
class CreateMarvelStoreNoticeTables extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
|
|||
Schema::create('store_notices', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->enum('priority', StoreNoticePriority::getValues())->default(StoreNoticePriority::LOW); |
|||
$table->text('notice'); |
|||
$table->text('description')->nullable(); |
|||
$table->dateTime('effective_from')->default(now()); |
|||
$table->dateTime('expired_at'); |
|||
$table->enum('type', StoreNoticeType::getValues()); |
|||
$table->foreignId('created_by')->nullable()->references('id')->on('users'); |
|||
$table->foreignId('updated_by')->nullable()->references('id')->on('users'); |
|||
$table->timestamps(); |
|||
$table->softDeletes(); |
|||
}); |
|||
Schema::create('store_notice_user', function (Blueprint $table) { |
|||
$table->foreignId('store_notice_id')->nullable()->references('id')->on('store_notices')->cascadeOnDelete(); |
|||
$table->foreignId('user_id')->nullable()->references('id')->on('users')->cascadeOnDelete(); |
|||
}); |
|||
Schema::create('store_notice_shop', function (Blueprint $table) { |
|||
$table->foreignId('store_notice_id')->nullable()->references('id')->on('store_notices')->cascadeOnDelete(); |
|||
$table->foreignId('shop_id')->nullable()->references('id')->on('shops')->cascadeOnDelete(); |
|||
}); |
|||
Schema::create('store_notice_read', function (Blueprint $table) { |
|||
$table->foreignId('store_notice_id')->nullable()->references('id')->on('store_notices')->cascadeOnDelete(); |
|||
$table->foreignId('user_id')->nullable()->references('id')->on('users')->cascadeOnDelete(); |
|||
$table->boolean('is_read')->default(false); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('store_notices'); |
|||
Schema::dropIfExists('store_notice_user'); |
|||
Schema::dropIfExists('store_notice_shop'); |
|||
Schema::dropIfExists('store_notice_read'); |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class AddColumnsToTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::table('reviews', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('order_id')->after('id')->nullable(); |
|||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('variation_option_id')->after('product_id')->nullable(); |
|||
$table->foreign('variation_option_id')->references('id')->on('variation_options')->onDelete('cascade'); |
|||
}); |
|||
|
|||
Schema::table('wishlists', function (Blueprint $table) { |
|||
$table->unsignedBigInteger('variation_option_id')->after('product_id')->nullable(); |
|||
$table->foreign('variation_option_id')->references('id')->on('variation_options')->onDelete('cascade'); |
|||
}); |
|||
Schema::table('orders', function (Blueprint $table) { |
|||
$table->decimal('cancelled_amount')->after('total')->default(0); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::table('reviews', function (Blueprint $table) { |
|||
$table->dropColumn('order_id'); |
|||
$table->dropColumn('variation_option_id'); |
|||
}); |
|||
|
|||
Schema::table('wishlists', function (Blueprint $table) { |
|||
$table->dropColumn('variation_option_id'); |
|||
}); |
|||
Schema::table('orders', function (Blueprint $table) { |
|||
$table->dropColumn('cancelled_amount'); |
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,76 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class CreateMessagesTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::create('conversations', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('messages', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('conversation_id'); |
|||
$table->foreign('conversation_id')->references('id')->on('conversations')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->text('body'); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::create('participants', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('conversation_id'); |
|||
$table->foreign('conversation_id')->references('id')->on('conversations')->onDelete('cascade'); |
|||
$table->enum('type', ['shop', 'user']); |
|||
$table->unsignedBigInteger('user_id'); |
|||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('shop_id'); |
|||
$table->foreign('shop_id')->references('id')->on('shops')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('message_id'); |
|||
$table->foreign('message_id')->references('id')->on('messages')->onDelete('cascade'); |
|||
$table->boolean('notify')->default(0); |
|||
$table->timestamp('last_read')->nullable(); |
|||
$table->timestamps(); |
|||
}); |
|||
|
|||
Schema::table('user_profiles', function ($table) { |
|||
$table->json('notifications')->after('contact')->nullable(); |
|||
}); |
|||
Schema::table('shops', function ($table) { |
|||
$table->json('notifications')->after('settings')->nullable(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
Schema::dropIfExists('conversations'); |
|||
Schema::dropIfExists('messages'); |
|||
Schema::dropIfExists('participants'); |
|||
Schema::table('user_profiles', function ($table) { |
|||
$table->dropColumn('notifications'); |
|||
}); |
|||
Schema::table('shops', function ($table) { |
|||
$table->dropColumn('notifications'); |
|||
}); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class AddColumnToOrderTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
*/ |
|||
public function up(): void |
|||
{ |
|||
Schema::table('orders', function (Blueprint $table) { |
|||
$table->decimal('cancelled_tax')->after('cancelled_amount')->default(0); |
|||
$table->decimal('cancelled_delivery_fee')->after('cancelled_tax')->default(0); |
|||
$table->longText('note')->after('total')->nullable(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
*/ |
|||
public function down(): void |
|||
{ |
|||
Schema::table('orders', function (Blueprint $table) { |
|||
$table->dropColumn('note'); |
|||
$table->dropColumn('cancelled_tax'); |
|||
$table->dropColumn('cancelled_delivery_fee'); |
|||
}); |
|||
} |
|||
}; |
@ -0,0 +1,37 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
return new class extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
*/ |
|||
public function up(): void |
|||
{ |
|||
Schema::create('notify_logs', function (Blueprint $table) { |
|||
$table->id(); |
|||
$table->unsignedBigInteger('receiver'); |
|||
$table->foreign('receiver')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->unsignedBigInteger('sender')->nullable(); |
|||
$table->foreign('sender')->references('id')->on('users')->onDelete('cascade'); |
|||
$table->text('notify_type')->nullable(); |
|||
$table->text('notify_receiver_type')->nullable(); |
|||
$table->boolean('is_read')->default(false); |
|||
$table->text('notify_tracker')->nullable(); |
|||
$table->text('notify_text')->nullable(); |
|||
$table->softDeletes(); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
*/ |
|||
public function down(): void |
|||
{ |
|||
Schema::dropIfExists('notify_logs'); |
|||
} |
|||
}; |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue