Skip to content

Commit b58300e

Browse files
committed
Remove unused configurations, update environment default values, refactor models to exclude deprecated FixesHydration trait, switch to Redis for caching and queueing, upgrade Filament packages, and clean obsolete files.
1 parent 177b191 commit b58300e

28 files changed

Lines changed: 250 additions & 560 deletions

.env.example

Lines changed: 16 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,48 @@
11
# ==============================================================================
22
# APPLICATION CONFIGURATION
33
# ==============================================================================
4-
APP_NAME="Your Application Name"
5-
APP_DOMAIN="yourdomain.com"
6-
APP_ENV=local
7-
APP_KEY=base64:your-app-key-here
8-
APP_DEBUG=true
9-
APP_URL=http://localhost
4+
APP_ENV=production
5+
APP_KEY=your_key
6+
APP_URL=https://your-url.org
107

118
# ==============================================================================
129
# SERVER & DEPLOYMENT
1310
# ==============================================================================
14-
SERVER_USER=your-server-username
15-
NOVA_LICENSE_KEY="your-nova-license-key-here"
16-
OPCACHE_WEBHOOK_TOKEN="your-opcache-webhook-token-here"
11+
OPCACHE_WEBHOOK_TOKEN="web-hook-token"
1712

1813
# ==============================================================================
1914
# LOGGING
2015
# ==============================================================================
21-
LOG_LEVEL=debug
16+
LOG_LEVEL=warning
2217

2318
# ==============================================================================
2419
# DATABASE
2520
# ==============================================================================
26-
DB_CONNECTION=mysql
27-
DB_HOST=127.0.0.1
28-
DB_PORT=3306
29-
DB_DATABASE=your_database_name
30-
DB_USERNAME=your_database_user
31-
DB_PASSWORD=your_database_password
32-
33-
# ==============================================================================
34-
# CACHE & SESSION
35-
# ==============================================================================
36-
BROADCAST_DRIVER=redis
37-
CACHE_DRIVER=redis
38-
FILESYSTEM_DISK=local
39-
QUEUE_CONNECTION=redis
21+
DB_HOST=your-ip
22+
DB_PORT=your=port
23+
DB_DATABASE=database-name
24+
DB_USERNAME=user-name
25+
DB_PASSWORD=password
4026

4127
# Redis Configuration
42-
REDIS_HOST=127.0.0.1
43-
REDIS_PASSWORD=null
44-
REDIS_PORT=6379
28+
REDIS_HOST=redis-ip
4529

4630
# Session Configuration
47-
SESSION_DOMAIN=".yourdomain.com"
48-
SESSION_DRIVER=memcached
49-
SESSION_LIFETIME=240
50-
51-
# Memcached Configuration
52-
MEMCACHED_HOST=127.0.0.1
53-
54-
# Lada-Cache Configuration
55-
LADA_CACHE_ENABLED=true
56-
57-
# ==============================================================================
58-
# QUEUE MANAGEMENT
59-
# ==============================================================================
60-
HORIZON_PREFIX="horizon:${APP_ENV}:"
31+
SESSION_DOMAIN=".your-domain.org"
6132

6233
# ==============================================================================
6334
# MAIL CONFIGURATION
6435
# ==============================================================================
65-
MAIL_MAILER=smtp
6636
MAIL_HOST=smtp.gmail.com
6737
MAIL_PORT=587
68-
MAIL_USERNAME=your-email@gmail.com
69-
MAIL_PASSWORD="your-app-specific-password"
38+
MAIL_USERNAME=user-name
39+
MAIL_PASSWORD="password"
7040
MAIL_ENCRYPTION=tls
71-
MAIL_FROM_ADDRESS="your-email@gmail.com"
72-
MAIL_FROM_NAME="${APP_NAME}"
73-
74-
# ==============================================================================
75-
# AWS SERVICES
76-
# ==============================================================================
77-
AWS_ACCESS_KEY_ID=your-aws-access-key-id
78-
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
79-
AWS_DEFAULT_REGION=us-east-2
80-
AWS_BUCKET=your-s3-bucket-name
81-
AWS_USE_PATH_STYLE_ENDPOINT=false
82-
83-
# ==============================================================================
84-
# BROADCASTING & REALTIME
85-
# ==============================================================================
86-
# Pusher Configuration
87-
PUSHER_APP_ID=your-pusher-app-id
88-
PUSHER_APP_KEY=your-pusher-app-key
89-
PUSHER_APP_SECRET=your-pusher-app-secret
90-
PUSHER_HOST=your-pusher-host
91-
PUSHER_PORT=443
92-
PUSHER_SCHEME=https
93-
PUSHER_APP_CLUSTER=mt1
94-
95-
# Laravel Mix Pusher Variables
96-
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
97-
MIX_PUSHER_HOST="${PUSHER_HOST}"
98-
MIX_PUSHER_PORT="${PUSHER_PORT}"
99-
MIX_PUSHER_SCHEME="${PUSHER_SCHEME}"
100-
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
10141

10242
# ==============================================================================
10343
# EXTERNAL SERVICES
10444
# ==============================================================================
10545

106-
# reCAPTCHA v2
107-
NOCAPTCHA_SITEKEY=your-recaptcha-v2-site-key
108-
NOCAPTCHA_SECRET=your-recaptcha-v2-secret-key
109-
11046
# reCAPTCHA v3
111-
RECAPTCHA_SITE_KEY=your-recaptcha-v3-site-key
112-
RECAPTCHA_SECRET_KEY=your-recaptcha-v3-secret-key
113-
114-
# Google Calendar Integration
115-
GOOGLE_COURSE_CALENDER_ID="your-google-calendar-id@group.calendar.google.com"
116-
GOOGLE_CREDENTIAL_FILE="path/to/your/google-credentials.json"
117-
118-
# ==============================================================================
119-
# UI COMPONENTS
120-
# ==============================================================================
121-
# Sweet Alert Configuration
122-
SWEET_ALERT_CDN=true
123-
SWEET_ALERT_AUTO_DISPLAY_ERROR_MESSAGES=true
124-
SWEET_ALERT_MIDDLEWARE_AUTO_CLOSE=true
125-
SWEET_ALERT_MIDDLEWARE_TOAST_POSITION=top
126-
127-
# ==============================================================================
128-
# LEGACY/UNUSED CONFIGURATIONS
129-
# ==============================================================================
130-
# iDigbio Calendar (Legacy - Commented Out)
131-
# GOOGLE_COURSE_CALENDER_ID="legacy-calendar-id@import.calendar.google.com"
132-
# GOOGLE_CALENDAR_ID="legacy-calendar-id@import.calendar.google.com"
47+
RECAPTCHA_SITE_KEY=recaptcha-key
48+
RECAPTCHA_SECRET_KEY=recaptcha-sescret

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ _ide_helper.php
3030
/.junie/
3131
/.ai/
3232
/aws-compare/
33+
/push-env-params
34+
/remove-env-params

app/Console/Commands/UpdateQueries.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,10 @@ class UpdateQueries extends Command
4343
*
4444
* @throws \Throwable
4545
*/
46-
public function handle() {}
46+
public function handle()
47+
{
48+
if (\Storage::exists('app/google-calendar/digitization-academy-b46a90f10ffb.json')) {
49+
\Storage::delete('app/google-calendar/digitization-academy-b46a90f10ffb.json');
50+
}
51+
}
4752
}

app/Models/Asset.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
namespace App\Models;
44

55
use App\Traits\ClearsResponseCache;
6-
use App\Traits\FixesHydration;
76
use Illuminate\Database\Eloquent\Factories\HasFactory;
87
use Illuminate\Database\Eloquent\Model;
98
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
109

1110
class Asset extends Model
1211
{
13-
use ClearsResponseCache, FixesHydration, HasFactory;
12+
use ClearsResponseCache, HasFactory;
1413

1514
/**
1615
* The attributes that are mass assignable.

app/Models/Course.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
namespace App\Models;
2222

2323
use App\Traits\ClearsResponseCache;
24-
use App\Traits\FixesHydration;
2524
use App\Traits\Presentable;
2625
use Illuminate\Database\Eloquent\Factories\HasFactory;
2726
use Illuminate\Database\Eloquent\Model;
@@ -49,7 +48,7 @@
4948
*/
5049
class Course extends Model
5150
{
52-
use ClearsResponseCache, FixesHydration, HasFactory, Presentable;
51+
use ClearsResponseCache, HasFactory, Presentable;
5352

5453
/**
5554
* The relationships that should always be loaded.

app/Models/CourseType.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
namespace App\Models;
2222

2323
use App\Traits\ClearsResponseCache;
24-
use App\Traits\FixesHydration;
2524
use Illuminate\Database\Eloquent\Factories\HasFactory;
2625
use Illuminate\Database\Eloquent\Model;
2726
use Illuminate\Database\Eloquent\Relations\HasMany;
@@ -39,7 +38,7 @@
3938
*/
4039
class CourseType extends Model
4140
{
42-
use ClearsResponseCache, FixesHydration, HasFactory;
41+
use ClearsResponseCache, HasFactory;
4342

4443
/**
4544
* The attributes that are mass assignable.

app/Models/Event.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@
2121
namespace App\Models;
2222

2323
use App\Traits\ClearsResponseCache;
24-
use App\Traits\FixesHydration;
2524
use Illuminate\Database\Eloquent\Casts\Attribute;
2625
use Illuminate\Database\Eloquent\Factories\HasFactory;
2726
use Illuminate\Database\Eloquent\Model;
2827
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2928

3029
class Event extends Model
3130
{
32-
use ClearsResponseCache, FixesHydration, HasFactory;
31+
use ClearsResponseCache, HasFactory;
3332

3433
/**
3534
* The attributes that are mass assignable.

app/Models/Notice.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@
2121
namespace App\Models;
2222

2323
use App\Traits\ClearsResponseCache;
24-
use App\Traits\FixesHydration;
2524
use Illuminate\Database\Eloquent\Model;
2625

2726
/**
2827
* Class Notice
2928
*/
3029
class Notice extends Model
3130
{
32-
use ClearsResponseCache, FixesHydration;
31+
use ClearsResponseCache;
3332

3433
/**
3534
* {@inheritDoc}

app/Models/Team.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@
2121
namespace App\Models;
2222

2323
use App\Traits\ClearsResponseCache;
24-
use App\Traits\FixesHydration;
2524
use App\Traits\Presentable;
2625
use Illuminate\Database\Eloquent\Factories\HasFactory;
2726
use Illuminate\Database\Eloquent\Model;
2827

2928
class Team extends Model
3029
{
31-
use ClearsResponseCache, FixesHydration, HasFactory, Presentable;
30+
use ClearsResponseCache, HasFactory, Presentable;
3231

3332
/**
3433
* The attributes that are mass assignable.

app/Models/User.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
use App\Notifications\VerifyEmailQueued;
2424
use App\Traits\ClearsResponseCache;
25-
use App\Traits\FixesHydration;
2625
use Filament\Models\Contracts\FilamentUser;
2726
use Filament\Panel;
2827
use Illuminate\Contracts\Auth\MustVerifyEmail;
@@ -34,7 +33,7 @@
3433

3534
class User extends Authenticatable implements FilamentUser, MustVerifyEmail
3635
{
37-
use ClearsResponseCache, FixesHydration, HasApiTokens, HasFactory, HasRoles, Notifiable;
36+
use ClearsResponseCache, HasApiTokens, HasFactory, HasRoles, Notifiable;
3837

3938
/**
4039
* The attributes that are mass assignable.

0 commit comments

Comments
 (0)