Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
APP_NAME=E-CommerceCore2
APP_ENV=local
APP_KEY=base64:xM3NA9se6EwiVw4npD/a9Mg96+633gZWhOePesLUL+o=
APP_DEBUG=false
APP_URL=http://e-commercecore2.test

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_PH

APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database

PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=core2
DB_USERNAME=root
DB_PASSWORD=

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
# CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_SCHEME=null
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"

STRIPE_KEY=pk_test_51S556eB5iLhdsBMHrg7pMrOq7tiSJamLvbacm2VrMwLaWLnIyGTHXzVeHkrrKvCgQCaLwEAcNH3ZSbhpRdLKgBh600UUVQPI3z
STRIPE_SECRET=sk_test_51S556eB5iLhdsBMHb3AYPnt9Fj4qx1YPS1RIlhsXWrQHzgnz77dI0aigl9CE0DGZ8RAItbyixQVVjEgdyB5t9CRG00kdQcpxyk
STRIPE_WEBHOOK_SECRET= whsec_b9be31d3f3176f049433a9311c8cf0d725ff23967dbcce61b3f75b9f39358dff

PAYMONGO_PUBLIC_KEY=pk_test_1DxrPucckC2Fpjo4WSAUXSWA
PAYMONGO_SECRET=sk_test_h5UZKMfb5ReEJQ4TFubFKH7c
PAYMONGO_WEBHOOK_SIG=

ALGOLIA_APP_ID=D1HI4Y9076
ALGOLIA_SECRET=8de552aea32720fbdf8e18efeccb87fd

13 changes: 10 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
APP_NAME=Laravel
APP_NAME=E-CommerceCore2
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_URL=http://e-commercecore2.test

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
Expand All @@ -23,7 +23,7 @@ LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_react_ecommerce
DB_DATABASE=core2
DB_USERNAME=root
DB_PASSWORD=

Expand Down Expand Up @@ -64,6 +64,13 @@ AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"

PAYMONGO_PUBLIC_KEY=your_public_key
PAYMONGO_SECRET_KEY=your_secret_key
PAYMONGO_WEBHOOK_SIG=your_webhook_signature

STRIPE_KEY=stripe-key
STRIPE_SECRET=stripe-secret-key
STRIPE_WEBHOOK_SECRET=stripe-webhook-secret-key

ALGOLIA_APP_ID=algolia-app-id
ALGOLIA_SECRET=algolia-secret-key
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function form(Form $form): Form
->pluck('name', 'id')
->toArray();
})
->label('Prent Category')
->label('Parent Category')
->preload()
->searchable(),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ protected function mutateFormDataBeforeSave(array $data): array
$variationTypeOptionIds = [];

// making the array [9,10] format
foreach ($this->record->variationTypes as $i => $variationType) {
$variationTypeOptionIds[] = $option['variation_type_' . ($variationType->id)]['id'];
foreach ($this->record->variationTypes as $id => $variationType) {
$variationTypeOptionIds[] = $option['variation_type_' . $variationType->id]['id'];
}

$quantity = $option['quantity'];
Expand Down
8 changes: 4 additions & 4 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class AppServiceProvider extends ServiceProvider
*/
public function register(): void
{
if ($this->app->isLocal()) {
$this->app->register(DebugbarServiceProvider::class);
$this->app->register(TelescopeServiceProvider::class);
}
if (config('app.env') === 'local') {
$this->app->register(DebugbarServiceProvider::class);
$this->app->register(TelescopeServiceProvider::class);
}

$this->app->singleton(CartInterface::class, function ($app) {
return new CartService($app->make(CartRepositoryInterface::class));
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@
"license": "MIT",
"require": {
"php": "^8.2",
"algolia/algoliasearch-client-php": "^4.28",
"filament/filament": "^3.3",
"filament/spatie-laravel-media-library-plugin": "3.3",
"filament/spatie-laravel-media-library-plugin": "^3.3",
"inertiajs/inertia-laravel": "^2.0",
"laravel/breeze": "^2.3",
"laravel/framework": "^12.0",
"laravel/sanctum": "^4.0",
"laravel/scout": "^10.15",
"laravel/scout": "^10.19",
"laravel/tinker": "^2.10.1",
"luigel/laravel-paymongo": "2.x-dev",
"php-http/curl-client": "^2.3",
"simonhamp/laravel-stripe-connect": "dev-master",
"spatie/laravel-permission": "^6.16",
"stripe/stripe-php": "^17.2",
"stripe/stripe-php": "^17.6",
"tightenco/ziggy": "^2.0",
"typesense/typesense-php": "^5.1"
},
Expand Down
Loading