initial commit

This commit is contained in:
2026-06-06 10:05:39 +07:00
commit b22608adbc
1577 changed files with 641460 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
.git
.gitattributes
.gitignore
.env
.env.example
local.env
node_modules
vendor
.DS_Store
.dockerignore
docker-compose.yml
Dockerfile
Dockerfile.nginx
docker-nginx.conf
docker-entrypoint.sh
AGENTS.MD
DEPLOY.htaccess
DEPLOYindex.php
database/database.sqlite
error_log
.cgi-bin/
.well-known/
public/build
storage
README.md
DEPLOYMENT_PLAN.md
+18
View File
@@ -0,0 +1,18 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4
+64
View File
@@ -0,0 +1,64 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
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=wdbs
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=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=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}"
+1
View File
@@ -0,0 +1 @@
16990 322360653
+11
View File
@@ -0,0 +1,11 @@
* text=auto eol=lf
*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
+27
View File
@@ -0,0 +1,27 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
/storage/logs/
/storage/framework/views/
/storage/framework/cache/
/storage/framework/sessions/
/storage/framework/testing/
/storage/app/temp/
error_log
+21
View File
@@ -0,0 +1,21 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
+152
View File
@@ -0,0 +1,152 @@
# Docker Deployment Rules
These rules were compiled from real failures during a Laravel + Coolify deployment. Apply them to any Docker/Laravel project.
---
## 1. Pin image tags, never use rolling tags
Don't use `composer:2`, `node:20`, `php:8.2-fpm-alpine` as rolling tags. They change over time and break builds months later. Use the same PHP version as your local environment.
```dockerfile
# BROKEN — will drift
FROM composer:2 AS composer
# GOOD — same PHP version as runtime
FROM php:8.2-cli-alpine AS composer
```
## 2. Verify PHP extensions from composer.lock, not assumptions
Don't guess which extensions are needed. Check what's actually declared:
```bash
grep 'ext-' composer.lock | sort -u
```
The `php:8.2-fpm-alpine` base image already has most extensions compiled in. Only install what's missing (typically just `pdo_mysql`).
```dockerfile
# BROKEN — listing 14 extensions, most already compiled in
RUN docker-php-ext-install pdo_mysql ctype curl dom fileinfo filter hash json libxml mbstring openssl pcre session tokenizer
# GOOD — only what's actually missing
RUN docker-php-ext-install pdo_mysql
```
## 3. Shared services need shared volumes
If Nginx and PHP-FPM are separate containers, Nginx cannot see the app container's files. Use a named volume shared between both:
```yaml
volumes:
app-public: # shared between app and nginx
app-storage: # shared between app and nginx
services:
nginx:
volumes:
- app-public:/var/www/html/public:ro
- app-storage:/var/www/html/storage:ro
app:
volumes:
- app-public:/var/www/html/public
- app-storage:/var/www/html/storage
```
## 4. Never use bash variable interpolation in PHP inline code
Inline PHP in entrypoint scripts must not use `$VARIABLE` inside double-quoted strings. Passwords containing `$`, `\`, or `"` will break bash parsing.
```bash
# BROKEN — password with $, \, " breaks
php -r "new PDO('...', '${DB_PASSWORD}');"
# SAFE — getenv() avoids bash expansion
php -r "new PDO('...', getenv('DB_PASSWORD'));"
```
## 5. Bind mounts fail in Coolify
Coolify resolves compose-relative paths differently from local Docker. Bind-mounting individual config files often fails with "not a directory". Bake configs into a custom image instead.
```yaml
# BROKEN — fails in Coolify
nginx:
image: nginx:alpine
volumes:
- ./docker-nginx.conf:/etc/nginx/conf.d/default.conf:ro
# GOOD — config baked into image
nginx:
build:
dockerfile: Dockerfile.nginx
```
```dockerfile
# Dockerfile.nginx
FROM nginx:1.25-alpine
COPY docker-nginx.conf /etc/nginx/conf.d/default.conf
```
## 6. Don't add Traefik labels to docker-compose in Coolify
Coolify auto-generates Traefik routing labels. Adding them manually causes conflicts or is ignored entirely.
```yaml
# DON'T — Coolify handles this
labels:
- "traefik.enable=true"
- "traefik.http.routers.aigo.rule=Host(`yourdomain.com`)"
- "traefik.http.services.aigo.loadbalancer.server.port=80"
```
## 7. Match the database image to the dump source
Check the SQL dump header to determine the actual database engine and version:
```sql
-- MariaDB dump 10.19 Distrib 10.6.25-MariaDB
-- Server version 10.6.25-MariaDB
```
Use the matching image — MariaDB and MySQL are not interchangeable for dump imports.
```yaml
# Source is MariaDB 10.6
image: mariadb:10.6
# Source is MySQL 8.0
image: mysql:8.0
```
## 8. MariaDB/mysql client needs `--ssl=0` inside containers
The `mariadb-client` package defaults to SSL. MySQL 8.0 and MariaDB containers have self-signed certs, causing connection failures.
```bash
# BROKEN — SSL error with self-signed cert
mysql -h mysql -u user -ppassword dbname < dump.sql
# GOOD — skip SSL for local container connections
mysql -h mysql --ssl=0 -u user -ppassword dbname < dump.sql
```
## 9. Review the full entrypoint flow for restart loops
`set -e` means any command failure exits the script → PHP-FPM never starts → Docker restarts indefinitely. Every step is a potential crash point.
```bash
#!/bin/sh
set -e
# 1. Wait for MySQL — check PDO connects
# 2. Import SQL — check --ssl=0 and credentials
# 3. config:cache — check APP_KEY is set
# 4. storage:link — check permissions
# 5. route:cache, view:cache — check directories are writable
# 6. exec php-fpm — only this should run as the final process
```
## 10. Healtcheck
use mariadb default healthcheck image script if available. if not available ask user first if you want to make a healthcheck for mariadb image.
+21
View File
@@ -0,0 +1,21 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
+306
View File
@@ -0,0 +1,306 @@
# Cleft Lip Data — Docker Deployment Plan
## Overview
Multi-container Docker deployment for a Laravel 11 cleft lip/palate medical records management app.
**Target:** Coolify
**Database:** MariaDB 10.6.25 (matching existing SQL dump)
**PHP:** 8.2 FPM Alpine
**Web Server:** Nginx 1.25 Alpine
---
## Architecture
```
Coolify auto-generates Traefik labels
┌─────▼─────┐
│ nginx │ :80
│ Dockerfile.nginx
└─────┬─────┘
│ volume: app-photos:ro
┌─────▼──────┐
│ app (fpm) │ :9000
│ Dockerfile
└─────┬──────┘
│ volume: app-storage
┌───────────▼───────────┐
│ mariadb:10.6.25 │ :3306
│ healthcheck: custom │ volume: mariadb_data
└───────────────────────┘
```
---
## Files to Create
| File | Content |
|---|---|
| `Dockerfile` | Multi-stage: Node build → Composer deps → PHP-FPM runtime |
| `Dockerfile.nginx` | Nginx with Laravel config baked in |
| `docker-nginx.conf` | Laravel-compatible Nginx site config |
| `docker-compose.yml` | 3 services: mariadb, app, nginx |
| `docker-entrypoint.sh` | Startup orchestration script |
| `.dockerignore` | Build context filter |
| `docker-healthcheck.sh` | MariaDB healthcheck (not used directly; Healthcheck is inline in compose for MariaDB) |
---
## 1. `Dockerfile` — Multi-Stage Build
### Stage 1: Node Build
- Base: `node:20-alpine`
- `npm ci`
- `npm run build` → outputs `public/build/assets/` + `public/build/manifest.json`
### Stage 2: Composer Dependencies
- Base: `php:8.2-cli-alpine`
- Copy `composer` binary from official `composer:2` image
- `composer install --no-dev --optimize-autoloader`
### Stage 3: PHP-FPM Runtime
- Base: `php:8.2-fpm-alpine`
- Install missing PHP extensions only:
- `pdo_mysql` (not in base)
- `gd` with `--with-freetype --with-jpeg` (not in base)
- `zip` (not in base)
- `intl` (recommended)
- `bcmath` (recommended)
- System packages: `libpng-dev`, `libjpeg-turbo-dev`, `freetype-dev`, `libzip-dev`, `icu-dev`, `oniguruma-dev`
- Create `app` user (non-root, UID 1001)
- Copy application source (excluding `node_modules`, `vendor`, `storage`, `.env`)
- Copy `vendor/` from Stage 2
- Copy `public/build/` from Stage 1
- Copy `docker-entrypoint.sh``/usr/local/bin/`
- Set `WORKDIR /var/www/html`
- `ENTRYPOINT ["docker-entrypoint.sh"]`
- `CMD ["php-fpm"]`
- `USER app`
---
## 2. `Dockerfile.nginx`
- Base: `nginx:1.25-alpine` (pinned)
- Copy `docker-nginx.conf``/etc/nginx/conf.d/default.conf`
---
## 3. `docker-nginx.conf`
```nginx
server {
listen 80;
server_name _;
root /var/www/html/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass app:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
location ~ /\.(?!well-known) {
deny all;
}
}
```
---
## 4. `docker-entrypoint.sh`
```bash
#!/bin/sh
set -e
# === 1. Wait for MySQL ===
# PDO connection loop, 60s timeout, 2s intervals
# Uses getenv('DB_HOST'), getenv('DB_PORT'), getenv('DB_DATABASE'),
# getenv('DB_USERNAME'), getenv('DB_PASSWORD')
# === 2. Generate APP_KEY if missing or default ===
# php artisan key:generate if getenv('APP_KEY') is empty
# But only if running in PHP-FPM context (not during build)
# === 3. Import SQL dump if tables don't exist ===
# Check if any tables exist via mysql --ssl=0 ...
# If not, import humicpro_cleftlipdata.sql
# === 4. Run migrations ===
# php artisan migrate --force
# === 5. Cache ===
# php artisan config:cache
# php artisan route:cache
# php artisan view:cache
# === 6. Storage link ===
# php artisan storage:link (if not already linked)
# === 7. Start PHP-FPM ===
exec php-fpm
```
**Critical rules applied:**
- `set -e` — any failure stops the script (rule 9)
- `getenv()` in PHP — no bash variable interpolation (rule 4)
- `--ssl=0` for mysql client (rule 8)
- `exec php-fpm` — final process replaces shell (rule 9)
---
## 5. `docker-compose.yml`
```yaml
services:
mariadb:
image: mariadb:10.6.25
volumes:
- mariadb_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost --ssl=0 -u root -p$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 10
start_period: 60s
restart: unless-stopped
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- app-storage:/var/www/html/storage
- app-photos:/var/www/html/public/photos
environment:
APP_ENV: production
APP_DEBUG: "false"
APP_URL: ${APP_URL}
APP_KEY: ${APP_KEY}
DB_HOST: mariadb
DB_PORT: "3306"
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
SESSION_DRIVER: database
QUEUE_CONNECTION: database
CACHE_STORE: database
MAIL_MAILER: ${MAIL_MAILER:-log}
LOG_CHANNEL: stack
LOG_LEVEL: ${LOG_LEVEL:-warning}
depends_on:
mariadb:
condition: service_healthy
restart: unless-stopped
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
volumes:
- app-storage:/var/www/html/storage:ro
- app-photos:/var/www/html/public/photos:ro
ports:
- "${NGINX_PORT:-80}:80"
depends_on:
- app
restart: unless-stopped
volumes:
mariadb_data:
app-storage:
app-photos:
```
**No Traefik labels** — Coolify auto-generates them (rule 6).
---
## 6. `.dockerignore`
```
.git
.gitattributes
.gitignore
.env
.env.example
local.env
node_modules
vendor
storage
.DS_Store
*.md
.dockerignore
docker-compose.yml
Dockerfile.nginx
docker-nginx.conf
humicpro_cleftlipdata.sql
AGENTS.MD
DEPLOY.htaccess
DEPLOYindex.php
database/database.sqlite
error_log
.build/
.cgi-bin/
.well-known/
```
---
## Key Compliance with AGENTS.md Rules
| Rule | How We Comply |
|---|---|
| 1. Pin image tags | `php:8.2-fpm-alpine`, `nginx:1.25-alpine`, `mariadb:10.6.25`, `node:20-alpine` — all pinned |
| 2. Verify PHP extensions | Base image has most; install only: `pdo_mysql`, `gd`, `zip`, `intl`, `bcmath` |
| 3. Shared volumes | `app-storage` and `app-photos` shared between `app` and `nginx` |
| 4. No bash var interpolation | Entrypoint uses PHP's `getenv()` where needed, not shell `${VAR}` |
| 5. No bind mounts | Nginx config baked into `Dockerfile.nginx`; all configs in images |
| 6. No Traefik labels | Zero labels in compose |
| 7. Match DB image | `mariadb:10.6.25` matches dump's `10.6.25-MariaDB` server version |
| 8. `--ssl=0` | Entrypoint and healthcheck use `--ssl=0` |
| 9. Entrypoint flow | `set -e`, step-by-step checks, `exec php-fpm` as final process |
| 10. DB healthcheck | Custom `mysqladmin ping` with 10 retries, 60s start period |
---
## Queue Worker
**Not needed.** The app contains:
- Zero job classes (`app/Jobs/` empty)
- Zero `dispatch()` calls in application code
- Zero `ShouldQueue` implementations
- `QUEUE_CONNECTION=database` is an unused default
All operations (data CRUD, file uploads, spreadsheet export, zip creation) are synchronous in HTTP requests.
---
## External Connections
**None.** The app is fully self-contained:
- No outgoing HTTP/API calls
- No third-party services
- No webhooks or callbacks
- No social login
Browser-only external resources:
- `fonts.bunny.net` (Google Fonts proxy)
- `cdn.jsdelivr.net/npm/flatpickr` (datepicker)
+17
View File
@@ -0,0 +1,17 @@
<?php
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the request...
(require_once __DIR__.'/bootstrap/app.php')
->handleRequest(Request::capture());
+61
View File
@@ -0,0 +1,61 @@
FROM node:20-alpine AS node-build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM php:8.2-cli-alpine AS composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install --no-dev --optimize-autoloader --no-scripts
COPY . .
RUN composer install --no-dev --optimize-autoloader
FROM php:8.2-fpm-alpine AS ext-builder
RUN apk add --no-cache \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
libzip-dev \
icu-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
pdo_mysql \
gd \
zip \
intl \
bcmath
FROM php:8.2-fpm-alpine AS runtime
RUN apk add --no-cache \
libpng \
libjpeg-turbo \
freetype \
libzip \
icu-libs \
mariadb-client \
su-exec
COPY --from=ext-builder /usr/local/lib/php/extensions/ /usr/local/lib/php/extensions/
COPY --from=ext-builder /usr/local/etc/php/conf.d/docker-php-ext-*.ini /usr/local/etc/php/conf.d/
RUN addgroup -g 1001 -S app && adduser -S app -u 1001 -G app
WORKDIR /var/www/html
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
COPY --chown=app:app . .
COPY --from=composer --chown=app:app /app/vendor ./vendor
COPY --from=node-build --chown=app:app /app/public/build ./public/build
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["php-fpm"]
+3
View File
@@ -0,0 +1,3 @@
FROM nginx:1.25-alpine
COPY docker-nginx.conf /etc/nginx/conf.d/default.conf
+66
View File
@@ -0,0 +1,66 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
## About Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
### Premium Partners
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[WebReinvent](https://webreinvent.com/)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Jump24](https://jump24.co.uk)**
- **[Redberry](https://redberry.international/laravel/)**
- **[Active Logic](https://activelogic.com)**
- **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)**
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
+119
View File
@@ -0,0 +1,119 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rules;
use Illuminate\Support\Facades\Auth;
class AdminController extends Controller
{
public function new_user(Request $request)
{
$request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
'user_type' => ['required', 'string'],
'created_by' => ['required', 'integer'],
]);
if ($request->user_type === 'admin') {
return redirect()->back()->withErrors(['user_type' => 'Invalid user type.']);
}
$user = User::create([
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($request->password),
'user_type' => $request->user_type,
'created_by' => $request->created_by,
]);
return redirect()->route('admin_dashboard')->with('success', 'User created successfully!');
}
public function index(Request $request)
{
$query = User::query();
$query->where('created_by', Auth::id());
if ($request->filled('role') && $request->role !== '') {
$query->where('user_type', $request->role);
}
if ($request->filled('email')) {
$query->where('email', 'like', '%' . $request->email . '%');
}
if ($request->filled('name')) {
$query->where('name', 'like', '%' . $request->name . '%');
}
$users = $query->orderBy('created_at', 'desc')->simplePaginate(15);
return view('admin_dashboard', compact('users'));
}
public function editUser($id)
{
$user = User::findOrFail($id);
$currentUserId = auth()->id();
if ($user->created_by != $currentUserId) {
return redirect()->route('admin_dashboard')->with('error', 'You do not have permission to edit this user.');
}
return view('edit_user_form', compact('user'));
}
public function updateUser(Request $request, $id)
{
$request->validate([
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users,email,' . $id,
'password' => 'sometimes|nullable|string|min:8|confirmed',
'user_type' => 'required|string',
]);
$user = User::findOrFail($id);
$currentUserId = auth()->id();
if ($user->created_by != $currentUserId) {
return redirect()->route('admin_dashboard')->with('error', 'You do not have permission to edit this user.');
}
$user->name = $request->name;
$user->email = $request->email;
if ($request->password) {
$user->password = Hash::make($request->password);
}
$user->user_type = $request->user_type;
$user->save();
return redirect()->route('admin_dashboard')->with('success', 'User updated successfully.');
}
public function destroy($id)
{
$user = User::findOrFail($id);
$user->delete();
return redirect()->route('admin_dashboard')->with('success', 'User deleted successfully.');
}
public function request_log()
{
$currentUserId = Auth::id();
$users = User::where('created_by', $currentUserId)->get();
return view('request_log', compact('users'));
}
}
@@ -0,0 +1,47 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\LoginRequest;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\View;
class AuthenticatedSessionController extends Controller
{
/**
* Display the login view.
*/
public function create(): View
{
return view('auth.login');
}
/**
* Handle an incoming authentication request.
*/
public function store(LoginRequest $request): RedirectResponse
{
$request->authenticate();
$request->session()->regenerate();
return redirect()->intended(route('dashboard', absolute: false));
}
/**
* Destroy an authenticated session.
*/
public function destroy(Request $request): RedirectResponse
{
Auth::guard('web')->logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
return redirect('/');
}
}
@@ -0,0 +1,40 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\ValidationException;
use Illuminate\View\View;
class ConfirmablePasswordController extends Controller
{
/**
* Show the confirm password view.
*/
public function show(): View
{
return view('auth.confirm-password');
}
/**
* Confirm the user's password.
*/
public function store(Request $request): RedirectResponse
{
if (! Auth::guard('web')->validate([
'email' => $request->user()->email,
'password' => $request->password,
])) {
throw ValidationException::withMessages([
'password' => __('auth.password'),
]);
}
$request->session()->put('auth.password_confirmed_at', time());
return redirect()->intended(route('dashboard', absolute: false));
}
}
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
class EmailVerificationNotificationController extends Controller
{
/**
* Send a new email verification notification.
*/
public function store(Request $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(route('dashboard', absolute: false));
}
$request->user()->sendEmailVerificationNotification();
return back()->with('status', 'verification-link-sent');
}
}
@@ -0,0 +1,21 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
class EmailVerificationPromptController extends Controller
{
/**
* Display the email verification prompt.
*/
public function __invoke(Request $request): RedirectResponse|View
{
return $request->user()->hasVerifiedEmail()
? redirect()->intended(route('dashboard', absolute: false))
: view('auth.verify-email');
}
}
@@ -0,0 +1,61 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Str;
use Illuminate\Validation\Rules;
use Illuminate\View\View;
class NewPasswordController extends Controller
{
/**
* Display the password reset view.
*/
public function create(Request $request): View
{
return view('auth.reset-password', ['request' => $request]);
}
/**
* Handle an incoming new password request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(Request $request): RedirectResponse
{
$request->validate([
'token' => ['required'],
'email' => ['required', 'email'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);
// Here we will attempt to reset the user's password. If it is successful we
// will update the password on an actual user model and persist it to the
// database. Otherwise we will parse the error and return the response.
$status = Password::reset(
$request->only('email', 'password', 'password_confirmation', 'token'),
function ($user) use ($request) {
$user->forceFill([
'password' => Hash::make($request->password),
'remember_token' => Str::random(60),
])->save();
event(new PasswordReset($user));
}
);
// If the password was successfully reset, we will redirect the user back to
// the application's home authenticated view. If there is an error we can
// redirect them back to where they came from with their error message.
return $status == Password::PASSWORD_RESET
? redirect()->route('login')->with('status', __($status))
: back()->withInput($request->only('email'))
->withErrors(['email' => __($status)]);
}
}
@@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rules\Password;
class PasswordController extends Controller
{
/**
* Update the user's password.
*/
public function update(Request $request): RedirectResponse
{
$validated = $request->validateWithBag('updatePassword', [
'current_password' => ['required', 'current_password'],
'password' => ['required', Password::defaults(), 'confirmed'],
]);
$request->user()->update([
'password' => Hash::make($validated['password']),
]);
return back()->with('status', 'password-updated');
}
}
@@ -0,0 +1,44 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;
use Illuminate\View\View;
class PasswordResetLinkController extends Controller
{
/**
* Display the password reset link request view.
*/
public function create(): View
{
return view('auth.forgot-password');
}
/**
* Handle an incoming password reset link request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(Request $request): RedirectResponse
{
$request->validate([
'email' => ['required', 'email'],
]);
// We will send the password reset link to this user. Once we have attempted
// to send the link, we will examine the response then see the message we
// need to show to the user. Finally, we'll send out a proper response.
$status = Password::sendResetLink(
$request->only('email')
);
return $status == Password::RESET_LINK_SENT
? back()->with('status', __($status))
: back()->withInput($request->only('email'))
->withErrors(['email' => __($status)]);
}
}
@@ -0,0 +1,50 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Auth\Events\Registered;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rules;
use Illuminate\View\View;
class RegisteredUserController extends Controller
{
/**
* Display the registration view.
*/
public function create(): View
{
return view('auth.register');
}
/**
* Handle an incoming registration request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(Request $request): RedirectResponse
{
$request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:'.User::class],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);
$user = User::create([
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($request->password),
]);
event(new Registered($user));
Auth::login($user);
return redirect(route('dashboard', absolute: false));
}
}
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Auth\Events\Verified;
use Illuminate\Foundation\Auth\EmailVerificationRequest;
use Illuminate\Http\RedirectResponse;
class VerifyEmailController extends Controller
{
/**
* Mark the authenticated user's email address as verified.
*/
public function __invoke(EmailVerificationRequest $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
}
if ($request->user()->markEmailAsVerified()) {
event(new Verified($request->user()));
}
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
}
}
+8
View File
@@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}
@@ -0,0 +1,55 @@
<?php
namespace App\Http\Controllers;
use App\Models\User;
use App\Models\operation as Operation;
use Illuminate\Http\request;
class DashboardController extends Controller
{
public function getUsersByRoleData()
{
// Mengambil jumlah data berdasarkan user_type
$usersByRoleData = User::selectRaw('user_type, count(*) as count')
->groupBy('user_type')
->orderBy('user_type')
->pluck('count')
->toArray();
// Jika terdapat user_type yang belum memiliki data, inisialisasi dengan 0
$usersByRoleData = array_pad($usersByRoleData, 5, 0);
return response()->json(['data' => $usersByRoleData]);
}
public function getDataJenisTerapi()
{
// Mengambil jumlah data berdasarkan jenis_terapi
$dataJenisTerapi = Operation::selectRaw('jenis_terapi, count(*) as count')
->groupBy('jenis_terapi')
->orderBy('jenis_terapi')
->pluck('count')
->toArray();
// Jika terdapat jenis_terapi yang belum memiliki data, inisialisasi dengan 0
$dataJenisTerapi = array_pad($dataJenisTerapi, 3, 0);
return response()->json(['data' => $dataJenisTerapi]);
}
public function getDataJenisKelamin()
{
// Mengambil jumlah data berdasarkan kelamin
$dataJenisKelamin = Operation::selectRaw('kelamin, count(*) as count')
->groupBy('kelamin')
->orderBy('kelamin')
->pluck('count')
->toArray();
// Jika terdapat kelamin yang belum memiliki data, inisialisasi dengan 0
$dataJenisKelamin = array_pad($dataJenisKelamin, 2, 0);
return response()->json(['data' => $dataJenisKelamin]);
}
}
@@ -0,0 +1,521 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\operation;
use App\Models\photo;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
use ZipArchive;
use App\Http\Controllers\RequestController;
class OperationController extends Controller
{
public function store(Request $request)
{
try {
// Validate the request data
$validated = $request->validate([
'nama' => 'required|string|max:255',
'tanggal_lahir' => 'required|date',
'umur' => 'required|integer',
'alamat' => 'required|string|max:255',
'suku' => 'required|string|max:255',
'kelamin' => 'required|string|in:Laki-laki,Perempuan',
'anak_ke' => 'required|integer',
'riwayathamil' => 'required|string',
'riwayatkeluarga' => 'required|string',
'riwayat_kawin_kerabat' => 'required|string',
'riwayat_penyakit_terdahulu' => 'required|string',
'kelainan_kongenital' => 'required|string|max:255',
'jenis_cleft' => 'required|string|in:sindromik,non_sindromik',
'jenis_terapi' => 'required|string|in:labioplasty,palatoplasty,gnatoplasty',
'diagnosa' => 'required|string|in:labioschisis,palatoschisis,labiopalatoschisis,labiognatoschisis,labiopalatognatoschisis',
'tanggal_operasi' => 'required|date',
'teknikoperasi' => 'required|string|max:255',
'operator' => 'required|string|max:255',
'lokasioperasi' => 'required|string|max:255',
'followup' => 'required|string',
'created_by_id' => 'required|integer',
'created_by_name' => 'required|string|max:255',
'photos_pre_op' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp|max:2048',
'photos_post_op' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp|max:2048',
'photos_kontrol' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp|max:2048',
]);
// Check for existing operation with the same nama, tanggal_lahir, and tanggal_operasi
$existingOperation = operation::where('nama', $validated['nama'])
->where('tanggal_lahir', $validated['tanggal_lahir'])
->where('tanggal_operasi', $validated['tanggal_operasi'])
// ->where('teknikoperasi', $validated['teknikoperasi'])
->first();
if ($existingOperation) {
return redirect()->back()->with('error', 'Terdapat data dengan Nama Pasien, Tanggal lahir, Tanggal operasi yang sama, Pastikan Data yang diinput bukan duplikat')->withInput();
}
// Create the operation
$operation = operation::create($validated);
// Handle photo uploads
$categories = ['pre_op', 'post_op', 'kontrol'];
foreach ($categories as $category) {
if ($request->hasFile("photos_$category")) {
$file = $request->file("photos_$category");
$fileName = time() . '_' . $category . '.' . $file->getClientOriginalExtension();
$file->move(public_path('photos'), $fileName);
photo::create([
'operation_id' => $operation->id,
// 'gambar' => 'photos/' . $fileName,
// Kalo pake server humic yang aneh pake yang dibawah ini, yang atas ini dikomen
'gambar' => 'public/photos/' . $fileName,
'kategori' => $category,
]);
}
}
return redirect()->route('upload_data')->with('success', 'Operation created successfully!');
} catch (\Exception $e) {
return redirect()->back()->with('error', 'An error occurred while creating the operation. ' . $e->getMessage());
}
}
public function index(Request $request)
{
$query = Operation::query();
if ($request->filled('pengunggah')) {
$query->where('created_by_name', 'like', '%' . $request->pengunggah . '%');
}
if ($request->filled('teknik')) {
$query->where('teknikoperasi', 'like', '%' . $request->teknik . '%');
}
if ($request->filled('gender') && $request->gender !== 'Semua') {
$query->where('kelamin', $request->gender);
}
if ($request->filled('umur_min')) {
$query->where('umur', '>=', $request->umur_min);
}
if ($request->filled('umur_max')) {
$query->where('umur', '<=', $request->umur_max);
}
if ($request->filled('nama_pasien')) {
$query->where('nama', 'like', '%' . $request->nama_pasien . '%');
}
$totalCount = $query->count();
$operations = $query->orderBy('created_at', 'desc')->simplePaginate(15);
$displayedCount = $operations->count();
return view('browse_data', compact('operations', 'totalCount', 'displayedCount'));
}
public function mydata(Request $request)
{
$userId = auth()->user()->id;
$query = Operation::where('created_by_id', $userId);
if ($request->filled('nama_pasien')) {
$query->where('nama', 'like', '%' . $request->nama_pasien . '%');
}
if ($request->filled('teknik')) {
$query->where('teknikoperasi', 'like', '%' . $request->teknik . '%');
}
if ($request->filled('gender') && $request->gender !== 'Semua') {
$query->where('kelamin', $request->gender);
}
if ($request->filled('umur_min')) {
$query->where('umur', '>=', $request->umur_min);
}
if ($request->filled('umur_max')) {
$query->where('umur', '<=', $request->umur_max);
}
$totalCount = $query->count();
$operations = $query->orderBy('created_at', 'desc')->simplePaginate(15);
$displayedCount = $operations->count();
return view('my_data', compact('operations', 'totalCount', 'displayedCount'));
}
public function edit(operation $operation)
{
// Check if the current authenticated user is the creator of the operation
if ($operation->created_by_id == Auth::id()) {
$preOpPhoto = photo::where('operation_id', $operation->id)->where('kategori', 'pre_op')->first();
$kontrolPhoto = photo::where('operation_id', $operation->id)->where('kategori', 'kontrol')->first();
$postOpPhoto = photo::where('operation_id', $operation->id)->where('kategori', 'post_op')->first();
return view('edit_data', compact('operation', 'preOpPhoto', 'kontrolPhoto', 'postOpPhoto'));
}
// If the user is not the creator, you can redirect them or show an error message
return redirect()->route('dashboard')->with('error', 'You do not have permission to edit this operation.');
}
public function update(Request $request, operation $operation)
{
// Check if the current authenticated user is the creator of the operation
if ($operation->created_by_id != Auth::id()) {
return redirect()->route('dashboard')->with('error', 'You do not have permission to update this operation.');
}
try{
// Validate the request data
$validated = $request->validate([
'nama' => 'required|string|max:255',
'tanggal_lahir' => 'required|date',
'umur' => 'required|integer',
'alamat' => 'required|string|max:255',
'suku' => 'required|string|max:255',
'kelamin' => 'required|string|in:Laki-laki,Perempuan',
'anak_ke' => 'required|integer',
'riwayathamil' => 'required|string',
'riwayatkeluarga' => 'required|string',
'riwayat_kawin_kerabat' => 'required|string',
'riwayat_penyakit_terdahulu' => 'required|string',
'kelainan_kongenital' => 'required|string|max:255',
'jenis_cleft' => 'required|string|in:sindromik,non_sindromik',
'jenis_terapi' => 'required|string|in:labioplasty,palatoplasty,gnatoplasty',
'diagnosa' => 'required|string|in:labioschisis,palatoschisis,labiopalatoschisis,labiognatoschisis,labiopalatognatoschisis',
'tanggal_operasi' => 'required|date',
'teknikoperasi' => 'required|string|max:255',
'operator' => 'required|string|max:255',
'lokasioperasi' => 'required|string|max:255',
'followup' => 'required|string',
'photos_pre_op' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp|max:2048',
'photos_post_op' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp|max:2048',
'photos_kontrol' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,webp|max:2048',
]);
// Update the operation
$operation->update($validated);
// Handle photo uploads
$categories = ['pre_op', 'post_op', 'kontrol'];
foreach ($categories as $category) {
if ($request->hasFile("photos_$category")) {
$file = $request->file("photos_$category");
$fileName = time() . '_' . $category . '.' . $file->getClientOriginalExtension();
// Find existing photo or create a new one
$photo = photo::where('operation_id', $operation->id)->where('kategori', $category)->first();
if ($photo) {
// Delete the old photo file
if (File::exists(public_path($photo->gambar))) {
File::delete(public_path($photo->gambar));
}
// Update the photo record
$file->move(public_path('photos'), $fileName);
// $photo->update(['gambar' => 'photos/' . $fileName]);
// Kalo pake server humic yang aneh pake yang dibawah ini, yang atas ini dikomen
$photo->update(['gambar' => 'public/photos/' . $fileName]);
} else {
// Create a new photo record
$file->move(public_path('photos'), $fileName);
photo::create([
'operation_id' => $operation->id,
// 'gambar' => 'photos/' . $fileName,
// Kalo pake server humic yang aneh pake yang dibawah ini, yang atas ini dikomen
'gambar' => 'public/photos/' . $fileName,
'kategori' => $category,
]);
}
}
}
return redirect()->route('my_data')->with('success', 'Operation updated successfully!');
} catch (\Exception $e) {
return redirect()->back()->with('error', 'An error occurred while updating the operation. ' . $e->getMessage());
}
}
public function show($id)
{
$operation = operation::findOrFail($id);
$preOpPhoto = photo::where('operation_id', $operation->id)->where('kategori', 'pre_op')->first();
$kontrolPhoto = photo::where('operation_id', $operation->id)->where('kategori', 'kontrol')->first();
$postOpPhoto = photo::where('operation_id', $operation->id)->where('kategori', 'post_op')->first();
return view('specific_data', compact('operation', 'preOpPhoto', 'kontrolPhoto', 'postOpPhoto'));
}
public function request_data($id)
{
$operation = operation::findOrFail($id);
return view('request_specific_data', compact('operation'));
}
// public function store_request_data(Request $request)
// {
// // Validate the request data
// $validated = $request->validate([
// 'nama_lengkap' => 'required|string|max:255',
// 'nomor_handphone' => 'required|integer',
// 'email' => 'required|string',
// 'nik' => 'required|integer',
// 'jenis_pengajuan' => 'required|string',
// 'tujuan_permohonan' => 'required|string',
// ]);
// // Create the request
// $operation = Operation::create([
// ]);
// return redirect()->route('upload_data')->with('success', 'Operation created successfully!');
// }
public function destroy(operation $operation)
{
// Check if the user has permission to delete this operation
if ($operation->created_by_id != Auth::id()) {
return redirect()->back()->with('error', 'You do not have permission to delete this operation.');
}
try {
DB::beginTransaction();
// Delete related photos first
photo::where('operation_id', $operation->id)->delete();
// Now delete the operation
$operation->delete();
DB::commit();
return redirect()->route('my_data')->with('success', 'Operation and related photos deleted successfully.');
} catch (\Exception $e) {
DB::rollBack();
return redirect()->back()->with('error', 'An error occurred while deleting the operation. ' . $e->getMessage());
}
}
public function download($id)
{
$operation = operation::findOrFail($id);
// Create a text file with operation data
$textContent = "";
foreach ($operation->getAttributes() as $key => $value) {
if (!in_array($key, ['id', 'created_by_id'])) {
$textContent .= ucfirst(str_replace('_', ' ', $key)) . ": " . $value . "\n";
}
}
$zipFileName = "operation_{$id}_data.zip";
$zipFilePath = storage_path("app/{$zipFileName}");
$zip = new \ZipArchive();
if ($zip->open($zipFilePath, \ZipArchive::CREATE) === TRUE) {
$zip->addFromString('operation_data.txt', $textContent);
// Add photos to the zip file
$photoCategories = ['pre_op', 'post_op'];
foreach ($photoCategories as $category) {
$photo = photo::where('operation_id', $operation->id)
->where('kategori', $category)
->first();
if ($photo) {
// Remove 'public/' from the beginning of the path
$relativePath = str_replace('public/', '', $photo->gambar);
$photoPath = public_path($relativePath);
if (file_exists($photoPath)) {
$zip->addFile($photoPath, $category . '_photo.' . pathinfo($photoPath, PATHINFO_EXTENSION));
}
}
}
$zip->close();
}
return response()->download($zipFilePath)->deleteFileAfterSend(true);
}
public function downall(Request $request)
{
function getExcelColumn($n) {
$string = '';
while ($n > 0) {
$n--;
$string = chr(65 + ($n % 26)) . $string;
$n = intdiv($n, 26);
}
return $string;
}
$query = Operation::query();
// Apply filters if they exist
if ($request->filled('pengunggah')) {
$query->where('created_by_name', 'like', '%' . $request->pengunggah . '%');
}
if ($request->filled('teknik')) {
$query->where('teknikoperasi', 'like', '%' . $request->teknik . '%');
}
if ($request->filled('gender') && $request->gender !== 'Semua') {
$query->where('kelamin', $request->gender);
}
if ($request->filled('umur_min')) {
$query->where('umur', '>=', $request->umur_min);
}
if ($request->filled('umur_max')) {
$query->where('umur', '<=', $request->umur_max);
}
if ($request->filled('nama_pasien')) {
$query->where('nama', 'like', '%' . $request->nama_pasien . '%');
}
$operations = $query->get();
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
// Set headers
$headers = ['ID', 'Nama', 'Tanggal Lahir', 'Umur', 'Alamat', 'Suku', 'Kelamin', 'Anak Ke', 'Riwayat Hamil', 'Riwayat Keluarga', 'Riwayat Kawin Kerabat', 'Riwayat Penyakit Terdahulu', 'Kelainan Kongenital', 'Jenis Cleft', 'Jenis Terapi', 'Diagnosa', 'Tanggal Operasi', 'Teknik Operasi', 'Operator', 'Lokasi Operasi', 'Follow Up', 'Created By Name', 'Created At', 'Updated At', 'Pre Op Photo', 'Post Op Photo', 'Kontrol Photo'];
$sheet->fromArray([$headers], NULL, 'A1');
// Populate data
$row = 2;
foreach ($operations as $operation) {
$data = [
$operation->id,
$operation->nama,
$operation->tanggal_lahir,
$operation->umur,
$operation->alamat,
$operation->suku,
$operation->kelamin,
$operation->anak_ke,
$operation->riwayathamil,
$operation->riwayatkeluarga,
$operation->riwayat_kawin_kerabat,
$operation->riwayat_penyakit_terdahulu,
$operation->kelainan_kongenital,
$operation->jenis_cleft,
$operation->jenis_terapi,
$operation->diagnosa,
$operation->tanggal_operasi,
$operation->teknikoperasi,
$operation->operator,
$operation->lokasioperasi,
$operation->followup,
$operation->created_by_name,
$operation->created_at,
$operation->updated_at,
];
$sheet->fromArray([$data], NULL, 'A' . $row);
// Add photos
$photoCategories = ['pre_op', 'post_op'];
$col = 25; // Start from column Y
foreach ($photoCategories as $category) {
$photo = photo::where('operation_id', $operation->id)
->where('kategori', $category)
->first();
if ($photo) {
$relativePath = str_replace('public/', '', $photo->gambar);
$photoPath = public_path($relativePath);
if (file_exists($photoPath)) {
$drawing = new Drawing();
$drawing->setName($category);
$drawing->setDescription($category);
$drawing->setPath($photoPath);
$drawing->setCoordinates(getExcelColumn($col) . $row);
$drawing->setWidth(100);
$drawing->setHeight(100);
$drawing->setWorksheet($sheet);
$sheet->getColumnDimension(getExcelColumn($col))->setWidth(15);
$sheet->getRowDimension($row)->setRowHeight(75);
}
}
$col++;
}
$row++;
}
// Auto-size columns
foreach (range('A', 'X') as $column) {
$sheet->getColumnDimension($column)->setAutoSize(true);
}
$writer = new Xlsx($spreadsheet);
$excelFilename = 'operations_data_' . time() . '.xlsx';
$zipFilename = 'operations_data_' . time() . '.zip';
$excelFilePath = storage_path('app/temp/' . $excelFilename);
$zipFilePath = storage_path('app/temp/' . $zipFilename);
// Ensure the temp directory exists
if (!file_exists(storage_path('app/temp'))) {
mkdir(storage_path('app/temp'), 0755, true);
}
// Save Excel file
$writer->save($excelFilePath);
// Create ZIP file
$zip = new ZipArchive();
if ($zip->open($zipFilePath, ZipArchive::CREATE) === TRUE) {
$zip->addFile($excelFilePath, $excelFilename);
// Add photos to ZIP
foreach ($operations as $operation) {
foreach ($photoCategories as $category) {
$photo = photo::where('operation_id', $operation->id)
->where('kategori', $category)
->first();
if ($photo) {
$relativePath = str_replace('public/', '', $photo->gambar);
$photoPath = public_path($relativePath);
if (file_exists($photoPath)) {
$zip->addFile($photoPath, "photos/{$operation->id}_{$category}." . pathinfo($photoPath, PATHINFO_EXTENSION));
}
}
}
}
$zip->close();
// Delete the Excel file after adding it to the zip
unlink($excelFilePath);
// Set headers for download
$headers = [
'Content-Type' => 'application/zip',
'Content-Disposition' => 'attachment; filename="' . $zipFilename . '"',
'Content-Length' => filesize($zipFilePath),
'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0',
'Pragma' => 'no-cache',
];
// Return the file download response
return response()->download($zipFilePath, $zipFilename, $headers)->deleteFileAfterSend(true);
} else {
return redirect()->back()->with('error', 'Failed to create zip file');
}
}
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PhotoController extends Controller
{
//
}
@@ -0,0 +1,60 @@
<?php
namespace App\Http\Controllers;
use App\Http\Requests\ProfileUpdateRequest;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Redirect;
use Illuminate\View\View;
class ProfileController extends Controller
{
/**
* Display the user's profile form.
*/
public function edit(Request $request): View
{
return view('profile.edit', [
'user' => $request->user(),
]);
}
/**
* Update the user's profile information.
*/
public function update(ProfileUpdateRequest $request): RedirectResponse
{
$request->user()->fill($request->validated());
if ($request->user()->isDirty('email')) {
$request->user()->email_verified_at = null;
}
$request->user()->save();
return Redirect::route('profile.edit')->with('status', 'profile-updated');
}
/**
* Delete the user's account.
*/
public function destroy(Request $request): RedirectResponse
{
$request->validateWithBag('userDeletion', [
'password' => ['required', 'current_password'],
]);
$user = $request->user();
Auth::logout();
$user->delete();
$request->session()->invalidate();
$request->session()->regenerateToken();
return Redirect::to('/');
}
}
+219
View File
@@ -0,0 +1,219 @@
<?php
namespace App\Http\Controllers;
use App\Models\request as DataRequest; // Renamed to avoid conflict with Illuminate\Http\Request
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class RequestController extends Controller
{
public function store(Request $request)
{
$validated = $request->validate([
'nama' => 'required|string|max:255',
'handphone' => 'required|string|max:255',
'email' => 'required|email|max:255',
'nik' => 'required|string|max:255',
'kategori' => 'required|string|max:255',
'tujuan' => 'required|string',
'created_by_id' => 'required|exists:users,id',
'operation_id' => 'nullable|exists:operations,id',
]);
$validated['status'] = 'Pending';
$validated['keterangan'] = '';
// Check if operation_id is present in the request
if ($request->has('operation_id')) {
$validated['operation_id'] = $request->operation_id;
} else {
// If operation_id is not in the request, set it to null
$validated['operation_id'] = null;
}
DataRequest::create($validated);
if ($validated['operation_id']) {
return redirect()->route('operations.show', ['id' => $validated['operation_id']])
->with('success', 'Your request has been submitted successfully.');
} else {
return redirect()->route('browse_data')
->with('success', 'Your request for all data has been submitted successfully.');
}
}
// public function index()
// {
// return view('request_log');
// }
// public function getData(Request $request)
// {
// $query = DataRequest::query();
// if ($request->filled('category')) {
// $query->where('kategori', $request->category);
// }
// if ($request->filled('status') && $request->status !== '') {
// $query->where('status', $request->status);
// }
// // Remove the else clause that was setting the default to 'Pending'
// if ($request->filled('email')) {
// $query->where('email', 'like', '%' . $request->email . '%');
// }
// if ($request->filled('name')) {
// $query->where('nama', 'like', '%' . $request->name . '%');
// }
// $requests = $query->orderBy('created_at', 'desc')->paginate(1);
// return view('partials.requests_table', compact('requests'))->render();
// }
public function index(Request $request)
{
$query = DataRequest::query();
if ($request->filled('category')) {
$query->where('kategori', $request->category);
}
if ($request->filled('status') && $request->status !== 'all') {
$query->where('status', $request->status);
}
if ($request->filled('email')) {
$query->where('email', 'like', '%' . $request->email . '%');
}
if ($request->filled('name')) {
$query->where('nama', 'like', '%' . $request->name . '%');
}
$requests = $query->orderBy('created_at', 'desc')->simplePaginate(15)->appends($request->all());
return view('request_log', compact('requests'));
}
public function show($id)
{
$request = DataRequest::findOrFail($id);
return view('request_log_specific_user', compact('request'));
}
public function destroy($id)
{
$request = DataRequest::findOrFail($id);
$request->delete();
return redirect()->route('request_log')->with('success', 'Request deleted successfully');
}
public function approve($id)
{
$request = DataRequest::findOrFail($id);
$request->update([
'status' => 'Approved',
'keterangan' => 'Request approved'
]);
return redirect()->route('requests.show', $id)->with('success', 'Request has been approved.');
}
public function reject(Request $httpRequest, $id)
{
$request = DataRequest::findOrFail($id);
$request->update([
'status' => 'Rejected',
'keterangan' => $httpRequest->keterangan
]);
return redirect()->route('requests.show', $id)->with('success', 'Request has been rejected.');
}
public function checkLatestRequest($operationId)
{
$request = DataRequest::where('operation_id', $operationId)
->where('created_by_id', Auth::id())
->latest()
->first();
return response()->json(['request' => $request]);
}
public function getRejectionReason($operationId)
{
$request = DataRequest::where('operation_id', $operationId)
->where('created_by_id', Auth::id())
->where('status', 'Rejected')
->latest()
->first();
return response()->json(['keterangan' => $request ? $request->keterangan : 'No reason provided']);
}
public function cancelRequest($operationId)
{
$user = Auth::user();
$request = DataRequest::where('operation_id', $operationId)
->where('created_by_id', $user->id)
->where('status', 'Pending')
->latest()
->first();
if ($request) {
$request->delete();
return redirect()->route('operations.show', ['id' => $operationId])
->with('success', 'Request cancelled successfully');
}
return redirect()->route('operations.show', ['id' => $operationId])
->with('error', 'No pending request found to cancel');
}
public function reqall()
{
return view('request_all_data');
}
public function checkAllDataRequest()
{
$user = Auth::user();
return DataRequest::where('created_by_id', $user->id)
->whereNull('operation_id')
->latest()
->first();
}
public function cancelAllRequest()
{
$user = Auth::user();
$request = DataRequest::where('created_by_id', $user->id)
->whereNull('operation_id')
->where('status', 'Pending')
->latest()
->first();
if ($request) {
$request->delete();
return redirect()->route('browse_data')
->with('success', 'All data request cancelled successfully');
}
return redirect()->route('browse_data')
->with('error', 'No pending request found to cancel');
}
public static function checkAllDataRequestforOp()
{
$user = Auth::user();
return DataRequest::where('created_by_id', $user->id)
->whereNull('operation_id')
->latest()
->first();
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class AdminCheck
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
if (auth()->user()->user_type !== 'admin') {
return redirect()->route('landing');
}
return $next($request);
}
}
@@ -0,0 +1,28 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use App\Http\Controllers\RequestController;
class CheckApprovedAllDataRequest
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)
{
$latestRequest = RequestController::checkAllDataRequestforOp();
if (!$latestRequest || $latestRequest->status !== 'Approved') {
return redirect()->back()->with('error', 'You do not have an approved request to download all data.');
}
return $next($request);
}
}
@@ -0,0 +1,23 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class OperatorHigherCheck
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
if (auth()->user()->user_type == 'operator' || auth()->user()->user_type == 'admin') {
return $next($request);
}
return redirect()->route('landing');
}
}
+85
View File
@@ -0,0 +1,85 @@
<?php
namespace App\Http\Requests\Auth;
use Illuminate\Auth\Events\Lockout;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;
class LoginRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
'email' => ['required', 'string', 'email'],
'password' => ['required', 'string'],
];
}
/**
* Attempt to authenticate the request's credentials.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function authenticate(): void
{
$this->ensureIsNotRateLimited();
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
RateLimiter::hit($this->throttleKey());
throw ValidationException::withMessages([
'email' => trans('auth.failed'),
]);
}
RateLimiter::clear($this->throttleKey());
}
/**
* Ensure the login request is not rate limited.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function ensureIsNotRateLimited(): void
{
if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
return;
}
event(new Lockout($this));
$seconds = RateLimiter::availableIn($this->throttleKey());
throw ValidationException::withMessages([
'email' => trans('auth.throttle', [
'seconds' => $seconds,
'minutes' => ceil($seconds / 60),
]),
]);
}
/**
* Get the rate limiting throttle key for the request.
*/
public function throttleKey(): string
{
return Str::transliterate(Str::lower($this->string('email')).'|'.$this->ip());
}
}
@@ -0,0 +1,23 @@
<?php
namespace App\Http\Requests;
use App\Models\User;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class ProfileUpdateRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)],
];
}
}
+49
View File
@@ -0,0 +1,49 @@
<?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<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
'user_type',
'created_by',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class operation extends Model
{
use HasFactory;
protected $fillable = [
'nama',
'umur',
'tanggal_lahir',
'suku',
'kelamin',
'alamat',
'anak_ke',
'riwayathamil',
'riwayatkeluarga',
'riwayat_penyakit_terdahulu',
'riwayat_kawin_kerabat',
'diagnosa',
'jenis_terapi',
'jenis_cleft',
'kelainan_kongenital',
'tanggal_operasi',
'teknikoperasi',
'operator',
'lokasioperasi',
'followup',
'created_by_id',
'created_by_name',
];
protected $dates = ['tanggal_lahir', 'tanggal_operasi'];
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class photo extends Model
{
use HasFactory;
protected $fillable = [
'operation_id', 'gambar', 'kategori',
];
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class request extends Model
{
use HasFactory;
protected $fillable = [
'nama', 'handphone', 'email', 'nik', 'kategori', 'tujuan', 'status', 'keterangan', 'created_by_id', 'operation_id',
];
protected $nullable = ['operation_id'];
public function operation()
{
return $this->belongsTo(Operation::class);
}
public function createdBy()
{
return $this->belongsTo(User::class, 'created_by_id');
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
if($this->app->environment('production')) {
\URL::forceScheme('https');
}
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use Illuminate\View\View;
class AppLayout extends Component
{
/**
* Get the view / contents that represents the component.
*/
public function render(): View
{
return view('layouts.app');
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use Illuminate\View\View;
class GuestLayout extends Component
{
/**
* Get the view / contents that represents the component.
*/
public function render(): View
{
return view('layouts.guest');
}
}
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true));
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command...
$status = (require_once __DIR__.'/bootstrap/app.php')
->handleCommand(new ArgvInput);
exit($status);
+18
View File
@@ -0,0 +1,18 @@
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();
+2
View File
@@ -0,0 +1,2 @@
*
!.gitignore
+5
View File
@@ -0,0 +1,5 @@
<?php
return [
App\Providers\AppServiceProvider::class,
];
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+13
View File
@@ -0,0 +1,13 @@
{
"resources/css/app.css": {
"file": "assets/app-DjcAiDht.css",
"src": "resources/css/app.css",
"isEntry": true
},
"resources/js/app.js": {
"file": "assets/app-Cs0QkU1O.js",
"name": "app",
"src": "resources/js/app.js",
"isEntry": true
}
}
+68
View File
@@ -0,0 +1,68 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9",
"phpoffice/phpspreadsheet": "^2.1"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/breeze": "^2.1",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
Generated
+9038
View File
File diff suppressed because it is too large Load Diff
+126
View File
@@ -0,0 +1,126 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application, which will be used when the
| framework needs to place the application's name in a notification or
| other UI elements where an application name needs to be displayed.
|
*/
'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
| the application so that it's available within Artisan commands.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. The timezone
| is set to "UTC" by default as it is suitable for most use cases.
|
*/
'timezone' => env('APP_TIMEZONE', 'UTC'),
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
];
+115
View File
@@ -0,0 +1,115 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option defines the default authentication "guard" and password
| reset "broker" for your application. You may change these values
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| which utilizes session storage plus the Eloquent user provider.
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication guards have a user provider, which defines how the
| users are actually retrieved out of your database or other storage
| system used by the application. Typically, Eloquent is utilized.
|
| If you have multiple user tables or models you may configure multiple
| providers to represent the model / table. These providers may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', App\Models\User::class),
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| These configuration options specify the behavior of Laravel's password
| reset functionality, including the table utilized for token storage
| and the user provider that is invoked to actually retrieve users.
|
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| window expires and users are asked to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
];
+107
View File
@@ -0,0 +1,107 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache store that will be used by the
| framework. This connection is utilized if another isn't explicitly
| specified when running a cache operation inside the application.
|
*/
'default' => env('CACHE_STORE', 'database'),
/*
|--------------------------------------------------------------------------
| 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: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'table' => env('DB_CACHE_TABLE', 'cache'),
'connection' => env('DB_CACHE_CONNECTION'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_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' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],
'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'),
],
'octane' => [
'driver' => 'octane',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
| stores, there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
];
+170
View File
@@ -0,0 +1,170 @@
<?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 database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/
'default' => env('DB_CONNECTION', 'sqlite'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Below are all of the database connections defined for your application.
| An example configuration is provided for each database system which
| is supported by Laravel. You're free to add / remove connections.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'mariadb' => [
'driver' => 'mariadb',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DB_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
/*
|--------------------------------------------------------------------------
| 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 on the database.
|
*/
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => true,
],
/*
|--------------------------------------------------------------------------
| 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 Memcached. You may define your connection settings here.
|
*/
'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'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],
];
+76
View File
@@ -0,0 +1,76 @@
<?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 for file storage.
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Below you may configure as many filesystem disks as necessary, and you
| may even configure multiple disks for the same driver. Examples for
| most supported storage drivers are configured here for reference.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
],
'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'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],
],
/*
|--------------------------------------------------------------------------
| 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'),
],
];
+132
View File
@@ -0,0 +1,132 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that is utilized to write
| messages to your logs. The value provided here should match one of
| the channels present in the list of "channels" configured below.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Laravel
| utilizes the Monolog PHP logging library, which includes a variety
| of powerful log handlers and formatters that you're free to use.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog", "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', env('LOG_STACK', 'single')),
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];
+116
View File
@@ -0,0 +1,116 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send all email
| messages unless another mailer is explicitly specified when sending
| the message. All additional mailers can be configured within the
| "mailers" array. Examples of each type of mailer are provided.
|
*/
'default' => env('MAIL_MAILER', 'log'),
/*
|--------------------------------------------------------------------------
| 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 that can be used
| when delivering an email. You may specify which one you're using for
| your mailers below. You may also add additional mailers if needed.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "resend", "log", "array",
| "failover", "roundrobin"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
],
'ses' => [
'transport' => 'ses',
],
'postmark' => [
'transport' => 'postmark',
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
// 'client' => [
// 'timeout' => 5,
// ],
],
'resend' => [
'transport' => 'resend',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
],
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'ses',
'postmark',
],
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all emails 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 emails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
];
+112
View File
@@ -0,0 +1,112 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue supports a variety of backends via a single, unified
| API, giving you convenient access to each backend using identical
| syntax for each. The default queue connection is defined below.
|
*/
'default' => env('QUEUE_CONNECTION', 'database'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection options for every queue backend
| used by your application. An example configuration is provided for
| each backend supported by Laravel. You're also free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'connection' => env('DB_QUEUE_CONNECTION'),
'table' => env('DB_QUEUE_TABLE', 'jobs'),
'queue' => env('DB_QUEUE', 'default'),
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
'queue' => env('BEANSTALKD_QUEUE', 'default'),
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
'block_for' => 0,
'after_commit' => false,
],
'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', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
'block_for' => null,
'after_commit' => false,
],
],
/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'job_batches',
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control how and where failed jobs are stored. Laravel ships with
| support for storing failed jobs in a simple file or in a database.
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'failed_jobs',
],
];
+38
View File
@@ -0,0 +1,38 @@
<?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.
|
*/
'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'),
],
'resend' => [
'key' => env('RESEND_KEY'),
],
'slack' => [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
],
],
];
+217
View File
@@ -0,0 +1,217 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option determines the default session driver that is utilized for
| incoming requests. Laravel supports a variety of storage options to
| persist session data. Database storage is a great default choice.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'database'),
/*
|--------------------------------------------------------------------------
| 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 expire immediately when the browser is closed then you may
| indicate that via the expire_on_close configuration option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it's stored. All encryption is performed
| automatically by Laravel and you may use the session like normal.
|
*/
'encrypt' => env('SESSION_ENCRYPT', false),
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When utilizing the "file" session driver, the session files are placed
| on disk. The default storage location is defined here; however, you
| are free to provide another location where they should be stored.
|
*/
'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'),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table to
| be used to store sessions. Of course, a sensible default is defined
| for you; however, you're welcome to change this to another table.
|
*/
'table' => env('SESSION_TABLE', 'sessions'),
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using one of the framework's cache driven session backends, you may
| define the cache store which should be used to store the session data
| between requests. This must match one of your defined cache stores.
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| 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 session cookie that is created by
| the framework. Typically, you should not need to change this value
| since doing so does not grant a meaningful security improvement.
|
*/
'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're free to change this when necessary.
|
*/
'path' => env('SESSION_PATH', '/'),
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| This value determines the domain and subdomains the session cookie is
| available to. By default, the cookie will be available to the root
| domain and all subdomains. Typically, this shouldn't be changed.
|
*/
'domain' => env('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
| 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 when it can't 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. It's unlikely you should disable this option.
|
*/
'http_only' => env('SESSION_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" to permit secure cross-site requests.
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => env('SESSION_SAME_SITE', 'lax'),
/*
|--------------------------------------------------------------------------
| Partitioned Cookies
|--------------------------------------------------------------------------
|
| Setting this value to true will tie the cookie to the top-level site for
| a cross-site context. Partitioned cookies are accepted by the browser
| when flagged "secure" and the Same-Site attribute is set to "none".
|
*/
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
];
+1
View File
@@ -0,0 +1 @@
*.sqlite*
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}
@@ -0,0 +1,49 @@
<?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('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();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};
@@ -0,0 +1,35 @@
<?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('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};
@@ -0,0 +1,57 @@
<?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('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
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.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};
@@ -0,0 +1,49 @@
<?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('operations', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('nama');
$table->integer('umur');
$table->date('tanggal_lahir');
$table->string('suku');
$table->string('kelamin');
$table->string('alamat');
$table->integer('anak_ke');
$table->string('riwayathamil');
$table->string('riwayatkeluarga');
$table->string('riwayat_penyakit_terdahulu');
$table->string('riwayat_kawin_kerabat');
$table->string('diagnosa');
$table->string('jenis_terapi');
$table->string('jenis_cleft');
$table->string('kelainan_kongenital');
$table->date('tanggal_operasi');
$table->string('teknikoperasi');
$table->string('operator');
$table->string('lokasioperasi');
$table->string('followup');
$table->integer('created_by_id');
$table->string('created_by_name');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('operations');
}
};
@@ -0,0 +1,31 @@
<?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('photos', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('operation_id');
$table->timestamps();
$table->string('gambar'); //kalo laravel basically nyimpen nama file doang
$table->string('kategori'); //isinya bisa string 'pre', 'in', 'post'
$table->foreign('operation_id')->references('id')->on('operations');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('photos');
}
};
@@ -0,0 +1,30 @@
<?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::table('users', function (Blueprint $table) {
$table->string('user_type');
$table->integer('created_by');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('user_type');
$table->dropColumn('created_by');
});
}
};
@@ -0,0 +1,39 @@
<?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('requests', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('operation_id');
$table->unsignedBigInteger('created_by_id');
$table->timestamps();
$table->string('nama');
$table->string('handphone');
$table->string('email');
$table->string('nik');
$table->string('kategori');
$table->string('tujuan');
$table->string('status');
$table->string('keterangan');
$table->foreign('created_by_id')->references('id')->on('users');
$table->foreign('operation_id')->references('id')->on('operations');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('requests');
}
};
@@ -0,0 +1,25 @@
<?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()
{
Schema::table('requests', function (Blueprint $table) {
$table->unsignedBigInteger('operation_id')->nullable()->change();
});
}
public function down()
{
Schema::table('requests', function (Blueprint $table) {
$table->unsignedBigInteger('operation_id')->nullable(false)->change();
});
}
};
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace Database\Seeders;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
// User::factory()->create([
// 'name' => 'Test User',
// 'email' => 'test@example.com',
// ]);
DB::table('users')->insert([
'name' => 'admin',
'email' => 'admin@2233322.xyz',
'password' => Hash::make('ibad12345'),
'user_type' => 'admin',
'created_by' => 0,
]);
}
}
+62
View File
@@ -0,0 +1,62 @@
services:
mariadb:
image: mariadb:10.6.25
volumes:
- mariadb_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 10
start_period: 60s
restart: unless-stopped
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- app-storage:/var/www/html/storage
- app-photos:/var/www/html/public/photos
environment:
APP_ENV: production
APP_DEBUG: "false"
APP_URL: ${APP_URL}
APP_KEY: ${APP_KEY}
DB_HOST: mariadb
DB_PORT: "3306"
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
SESSION_DRIVER: database
QUEUE_CONNECTION: database
CACHE_STORE: database
LOG_CHANNEL: stack
LOG_LEVEL: warning
depends_on:
mariadb:
condition: service_healthy
restart: unless-stopped
nginx:
build:
context: .
dockerfile: Dockerfile.nginx
volumes:
- app-photos:/var/www/html/public/photos:ro
ports:
- "${NGINX_PORT:-80}:80"
depends_on:
- app
restart: unless-stopped
volumes:
mariadb_data:
app-storage:
app-photos:
+86
View File
@@ -0,0 +1,86 @@
#!/bin/sh
set -e
# If running as root, fix permissions on volumes
if [ "$(id -u)" = "0" ]; then
mkdir -p /var/www/html/storage/framework/cache/data
mkdir -p /var/www/html/storage/framework/sessions
mkdir -p /var/www/html/storage/framework/testing
mkdir -p /var/www/html/storage/framework/views
mkdir -p /var/www/html/storage/logs
mkdir -p /var/www/html/storage/app/public
mkdir -p /var/www/html/storage/app/temp
mkdir -p /var/www/html/public/photos
chown -R app:app /var/www/html/storage /var/www/html/public/photos
fi
# 1. Wait for MySQL
echo "Waiting for MySQL..."
for i in $(seq 1 30); do
php -r "
\$pdo = @new PDO(
'mysql:host=' . getenv('DB_HOST') . ';port=' . getenv('DB_PORT') . ';dbname=' . getenv('DB_DATABASE'),
getenv('DB_USERNAME'),
getenv('DB_PASSWORD'),
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
echo 'OK';
" 2>/dev/null | grep -q 'OK' && break
echo " attempt $i/30 — MySQL not ready, retrying in 2s..."
sleep 2
done
# Verify connection was established
php -r "
\$pdo = @new PDO(
'mysql:host=' . getenv('DB_HOST') . ';port=' . getenv('DB_PORT') . ';dbname=' . getenv('DB_DATABASE'),
getenv('DB_USERNAME'),
getenv('DB_PASSWORD'),
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
" || { echo "Failed to connect to MySQL after 60s"; exit 1; }
echo "MySQL is ready."
# 2. Generate APP_KEY if missing
if [ -z "$(php -r "echo getenv('APP_KEY') ?: '';")" ]; then
echo "Generating APP_KEY..."
php artisan key:generate --force
fi
# 3. Import SQL dump if tables don't exist
TABLE_COUNT=$(php -r "
\$pdo = @new PDO(
'mysql:host=' . getenv('DB_HOST') . ';port=' . getenv('DB_PORT') . ';dbname=' . getenv('DB_DATABASE'),
getenv('DB_USERNAME'),
getenv('DB_PASSWORD')
);
\$stmt = \$pdo->query('SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE()');
echo \$stmt->fetchColumn();
")
if [ "$TABLE_COUNT" -eq 0 ]; then
echo "Importing SQL dump..."
mysql -h "$DB_HOST" --ssl=0 -u "$DB_USERNAME" -p"$DB_PASSWORD" "$DB_DATABASE" < /var/www/html/humicpro_cleftlipdata.sql
echo "SQL dump imported."
fi
# 4. Run migrations
echo "Running migrations..."
php artisan migrate --force
# 5. Cache
echo "Optimizing cache..."
php artisan config:cache
php artisan route:cache
php artisan view:cache
# 6. Storage link
php artisan storage:link 2>/dev/null || true
# 7. Switch to app user and start PHP-FPM
if [ "$(id -u)" = "0" ]; then
exec su-exec app php-fpm
else
exec php-fpm
fi
+20
View File
@@ -0,0 +1,20 @@
server {
listen 80;
server_name _;
root /var/www/html/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass app:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known) {
deny all;
}
}
View File
File diff suppressed because one or more lines are too long
+17
View File
@@ -0,0 +1,17 @@
<?php
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
// Determine if the application is in maintenance mode...
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
require $maintenance;
}
// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the request...
(require_once __DIR__.'/bootstrap/app.php')
->handleRequest(Request::capture());
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
@charset 'UTF-8';.slick-loading .slick-list{background:#fff url(ajax-loader.gif) center center no-repeat}@font-face{font-family:slick;font-weight:400;font-style:normal;src:url(fonts/slick.eot);src:url(fonts/slick.eot?#iefix) format('embedded-opentype'),url(fonts/slick.woff) format('woff'),url(fonts/slick.ttf) format('truetype'),url(fonts/slick.svg#slick) format('svg')}.slick-next,.slick-prev{font-size:0;line-height:0;position:absolute;top:50%;display:block;width:20px;height:20px;padding:0;-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);cursor:pointer;color:transparent;border:none;outline:0;background:0 0}.slick-next:focus,.slick-next:hover,.slick-prev:focus,.slick-prev:hover{color:transparent;outline:0;background:0 0}.slick-next:focus:before,.slick-next:hover:before,.slick-prev:focus:before,.slick-prev:hover:before{opacity:1}.slick-next.slick-disabled:before,.slick-prev.slick-disabled:before{opacity:.25}.slick-next:before,.slick-prev:before{font-family:slick;font-size:20px;line-height:1;opacity:.75;color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-prev{left:-25px}[dir=rtl] .slick-prev{right:-25px;left:auto}.slick-prev:before{content:'←'}[dir=rtl] .slick-prev:before{content:'→'}.slick-next{right:-25px}[dir=rtl] .slick-next{right:auto;left:-25px}.slick-next:before{content:'→'}[dir=rtl] .slick-next:before{content:'←'}.slick-dotted.slick-slider{margin-bottom:30px}.slick-dots{position:absolute;bottom:-25px;display:block;width:100%;padding:0;margin:0;list-style:none;text-align:center}.slick-dots li{position:relative;display:inline-block;width:20px;height:20px;margin:0 5px;padding:0;cursor:pointer}.slick-dots li button{font-size:0;line-height:0;display:block;width:20px;height:20px;padding:5px;cursor:pointer;color:transparent;border:0;outline:0;background:0 0}.slick-dots li button:focus,.slick-dots li button:hover{outline:0}.slick-dots li button:focus:before,.slick-dots li button:hover:before{opacity:1}.slick-dots li button:before{font-family:slick;font-size:6px;line-height:20px;position:absolute;top:0;left:0;width:20px;height:20px;content:'•';text-align:center;opacity:.25;color:#000;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-dots li.slick-active button:before{opacity:.75;color:#000}
/*# sourceMappingURL=slick-theme.min.css.map */
+2
View File
@@ -0,0 +1,2 @@
.slick-slider{position:relative;display:block;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-khtml-user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{position:relative;display:block;overflow:hidden;margin:0;padding:0}.slick-list:focus{outline:0}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-list,.slick-slider .slick-track{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slick-track{position:relative;top:0;left:0;display:block;margin-left:auto;margin-right:auto}.slick-track:after,.slick-track:before{display:table;content:''}.slick-track:after{clear:both}.slick-loading .slick-track{visibility:hidden}.slick-slide{display:none;float:left;height:100%;min-height:1px}[dir=rtl] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-loading .slick-slide{visibility:hidden}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-arrow.slick-hidden{display:none}
/*# sourceMappingURL=slick.min.css.map */
Binary file not shown.

After

Width:  |  Height:  |  Size: 754 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long
+13
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5
View File
File diff suppressed because one or more lines are too long
+73
View File
@@ -0,0 +1,73 @@
$(function () {
// init feather icons
feather.replace();
// init tooltip & popovers
$('[data-toggle="tooltip"]').tooltip();
$('[data-toggle="popover"]').popover();
//page scroll
$('a.page-scroll').bind('click', function (event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top - 20
}, 1000);
event.preventDefault();
});
// slick slider
$('.slick-about').slick({
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 3000,
dots: true,
arrows: false
});
//toggle scroll menu
var scrollTop = 0;
$(window).scroll(function () {
var scroll = $(window).scrollTop();
//adjust menu background
if (scroll > 80) {
if (scroll > scrollTop) {
$('.smart-scroll').addClass('scrolling').removeClass('up');
} else {
$('.smart-scroll').addClass('up');
}
} else {
// remove if scroll = scrollTop
$('.smart-scroll').removeClass('scrolling').removeClass('up');
}
scrollTop = scroll;
// adjust scroll to top
if (scroll >= 600) {
$('.scroll-top').addClass('active');
} else {
$('.scroll-top').removeClass('active');
}
return false;
});
// scroll top top
$('.scroll-top').click(function () {
$('html, body').stop().animate({
scrollTop: 0
}, 1000);
});
/**Theme switcher - DEMO PURPOSE ONLY */
$('.switcher-trigger').click(function () {
$('.switcher-wrap').toggleClass('active');
});
$('.color-switcher ul li').click(function () {
var color = $(this).attr('data-color');
$('#theme-color').attr("href", "css/" + color + ".css");
$('.color-switcher ul li').removeClass('active');
$(this).addClass('active');
});
});
+1
View File
File diff suppressed because one or more lines are too long
+545
View File
@@ -0,0 +1,545 @@
/*!
* Created by Kroplet (https://www.kroplet.com)
* The easiest way to create Bootstrap 4 themes.
*/
/*****************
Custom CSS
*****************/
body {
border-color: $black;
}
.small-xl {
font-size: 90%;
}
.img-faded {
opacity: .5;
}
.font-weight-medium {
font-weight: 600;
}
.heading-black {
font-weight: 800;
}
/* Box shadow */
.btn {
text-transform: uppercase;
font-size: 15px;
@each $color, $value in $theme-colors {
&.btn-#{$color} {
box-shadow: 0 8px 16px rgba($value,.3);
transition: all .2s ease-out;
&:hover {
box-shadow: 0 8px 20px rgba($value,.35);
}
&:active {
box-shadow: none !important;
}
}
}
}
/*Navbar*/
.navbar {
&.navbar-transparent {
opacity: 0.98;
}
@media (max-width: 992px) {
&.navbar-transparent {
background-color: rgba($black, 0.4);
}
}
.navbar-brand {
font-size: 1.5rem;
font-weight: 900;
color: $primary;
text-transform: uppercase;
}
.navbar-nav .nav-item {
margin: 0 .7rem;
.nav-link {
font-weight: 600;
}
}
}
.section-angle {
position: relative;
border-color: inherit;
background: $black;
&:before, &:after {
width: 0;
height: 0;
position: absolute;
content: "";
left: 0;
border: 0 solid transparent;
z-index: 3;
}
&.top-left:before,
&.top-right:before {
top: 0;
border-left-width: 100vw;
}
&.bottom-left:after,
&.bottom-right:after {
bottom: 0;
border-right-width: 100vw;
}
&.bottom-left:after {
border-right-color: inherit;
}
&.bottom-right:after {
border-bottom-color: inherit;
}
&.top-left:before {
border-top-color: inherit;
}
&.top-right:before {
border-left-color: inherit;
}
@include media-breakpoint-up('lg') {
&.bottom-right:after,
&.top-right:before {
border-bottom-width: 2rem;
}
&.bottom-left:after,
&.top-left:before {
border-top-width: 2rem;
}
}
@include media-breakpoint-down('sm') {
&.bottom-right:after,
&.top-right:before {
border-bottom-width: 1rem;
}
&.bottom-left:after,
&.top-left:before {
border-top-width: 1rem;
}
}
}
/*smart scrolling*/
.smart-scroll {
position: fixed;
top: 0;
z-index: 1020;
width: 100%;
transition: all .3s ease-out;
&.scrolling {
transform: translateY(-100%);
&.up {
background-color: rgba($black, .9);
transform: translateY(0);
transition: all .3s ease-out;
}
}
}
/**dividers */
.divider {
position: relative;
&.top-divider:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
display: block;
height: 1px;
background: $gray-900;
background: linear-gradient(to right, rgba($primary,0.1) 0, $gray-900 50%, rgba($primary,0.1) 100%);
}
&.bottom-divider:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
display: block;
height: 1px;
background: $gray-900;
background: linear-gradient(to right, rgba($primary,0.24) 0, $gray-900 50%, rgba($primary,0.24) 100%);
}
}
/*vertical heights */
.vh-100 {
height: 100vh;
}
@media (min-width:576px){
.vh-sm-100{
height: 100vh;
}
}
@media (min-width:768px){
.vh-md-100{
height: 100vh;
}
}
.bg-hero {
background-color: $black;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 800 800'%3E%3Cg %3E%3Ccircle fill='#{$black}' cx='400' cy='400' r='600'/%3E%3Ccircle fill='#{darken($primary,40%)}' cx='400' cy='400' r='500'/%3E%3Ccircle fill='#{darken($primary,30%)}' cx='400' cy='400' r='400'/%3E%3Ccircle fill='#{darken($primary,20%)}' cx='400' cy='400' r='300'/%3E%3Ccircle fill='#{darken($primary,10%)}' cx='400' cy='400' r='200'/%3E%3Ccircle fill='#{$primary}' cx='400' cy='400' r='100'/%3E%3C/g%3E%3C/svg%3E");
/* background by SVGBackgrounds.com */
background-attachment: fixed;
background-size: cover;
position: relative;
&:before {
position: absolute;
z-index: 1;
width: 100%;
height: 100%;
display: block;
left: 0;
top: 0;
content: "";
background-color: rgba($black, 0.7);
}
.container {
z-index: 2;
position: relative;
}
}
/*features boxes*/
.feature-boxes {
text-align: center;
.box {
padding: 3rem;
}
}
/*features-list */
.features-list {
list-style: none;
li {
float: left;
width: 50%;
margin-top: 0;
margin-bottom: 1.75rem;
font-size: 1.05rem;
padding-left: 1.75rem;
font-weight: 500;
&:before {
position: relative;
font-family: FontAwesome;
font-size: 14px;
content: "\f10c";
color: $primary;
margin: 0 .75rem 0 0;
}
}
}
/*Pricing tables*/
.pricing-table {
.pricing-list{
margin-bottom: 3rem;
margin-top: 2rem;
li {
margin-bottom: 1rem;
font-size: 1.05rem;
font-weight: 500;
}
}
.card {
transition: all .25s ease-out;
text-align: center;
.card-body {
padding: 2.25rem 2rem;
}
&.active {
color: white;
background-color: transparent;
h2, h3 {
color: $white;
}
}
}
}
/**slick slider */
.slick-dots {
top: -4rem;
li {
button::before {
font-size: .75rem !important;
line-height: 3.5rem !important;
}
button::before, &.slick-active button:before {
color: $primary !important;
}
}
}
.slick-next:before, .slick-prev:before {
color: rgba($primary, 0.2);
}
.slick-next:hover:before, .slick-prev:hover:before {
color: $primary;
}
/*footer*/
footer {
ul > li {
padding: 0.5rem 0;
}
a {
color: rgba($white,.7);
text-decoration: none;
font-weight: 500;
transition: all 0.25s ease-out;
&:hover {
color: rgba($white,.9);
text-decoration: underline;
}
}
h5 {
font-size: 1rem;
text-transform: uppercase;
}
}
/*social icons*/
.social {
a {
width: 45px;
height: 45px;
background: transparent;
display: block;
text-align: center;
color: gray-100;
border-radius: 4px;
font-size: 18px;
line-height: 45px;
&:hover {
background: $primary;
color: $black;
transition: all .4s ease-in-out;
}
}
&.social-sm a {
width: 35px;
height: 35px;
font-size: 16px;
line-height: 35px;
}
&.social-rounded a {
border-radius: 50%;
}
}
/*scroll to top */
.scroll-top {
bottom: 20px;
font-size: 20px;
height: 40px;
position: fixed;
text-align: center;
width: 40px;
z-index: 10;
cursor: pointer;
transition: .3s;
border-radius: 50%;
line-height: 40px;
right: -100px;
color: $white;
background-color: rgba($primary, .5);
&:hover {
background-color: rgba($primary, 1);
transition: all .4s ease-in-out;
}
&.active {
right: 20px;
}
}
/* Icon Boxes */
.icon-box {
position: relative;
border-radius: 50%;
display: inline-block;
vertical-align: middle;
background-color: $white;
margin: 1rem;
@each $color, $value in $theme-colors {
&.box-#{$color} {
color: $value;
background-color: rgba($value, .1);
}
}
.icon-box-inner {
display: flex;
flex-direction: row;
align-items: center;
padding: 1.5rem;
&.small {
padding: 1.25rem;
}
&.small-xs {
padding: 1rem;
}
}
}
/*all themes colors*/
.bg-black {
background-color: $black;
}
.bg-blue {
background-color: $blue;
}
.bg-indigo {
background-color: $indigo;
}
.bg-purple {
background-color: $purple;
}
.bg-pink {
background-color: $pink;
}
.bg-red {
background-color: $red;
}
.bg-orange {
background-color: $orange;
}
.bg-yellow {
background-color: $yellow;
}
.bg-green {
background-color: $green;
}
.bg-teal {
background-color: $teal;
}
.bg-cyan {
background-color: $cyan;
}
/*theme switcher*/
.switcher-wrap {
position: fixed;
top: 250px;
width: 250px;
background: $gray-900;
color: $body-color;
z-index: 100;
padding: 20px;
left: -250px;
transition: .3s;
&.active {
left: 0;
}
ul {
margin: 0;
padding: 0;
list-style: none;
li {
margin-bottom: .5rem;
a {
color: $body-color;
&:hover {
color: $primary;
}
}
}
}
.color-switcher ul li {
width: 28px;
height: 28px;
float: left;
margin: 3px;
margin-bottom: 10px;
cursor: pointer;
transition: .3s;
&.active {
border: 3px solid $gray-800;
}
}
.switcher-trigger {
position: absolute;
left: 100%;
width: 40px;
height: 40px;
background: $gray-900;
top: 0;
font-size: 20px;
text-align: center;
color: rgba($primary, 0.5);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0 2px 2px 0;
&:hover {
color: $primary;
}
}
}
@media screen and (max-width: 768px) {
.switcher-wrap {
display: none;
}
}
+794
View File
@@ -0,0 +1,794 @@
/*!
* Created by Kroplet (https://www.kroplet.com)
* The easiest way to create Bootstrap 4 themes.
*/
//
//Colors
//
// Base Colors
$white: #ffffff;
$gray-100: #ECEFF1;
$gray-200: #CFD8DC;
$gray-300: #B0BEC5;
$gray-400: #90A4AE;
$gray-500: #78909C;
$gray-600: #607D8B;
$gray-700: #546E7A;
$gray-800: #455A64;
$gray-900: #263238;
$black: #000000;
$blue: #2979ff;
$indigo: #3d5afe;
$purple: #d500f9;
$pink: #f50057;
$red: #ff1744;
$orange: #ff9100;
$yellow: #ffea00;
$green: #00e676;
$teal: #1de9b6;
$cyan: #00e5ff;
// Theme Colors
$primary: $teal;
$secondary: $white;
$success: $green;
$info: $cyan;
$warning: $yellow;
$danger: $red;
$light: $gray-100;
$dark: darken($gray-900, 10%);
$theme-colors: ();
$theme-colors: map-merge((
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"light": $light,
"dark": $dark,
), $theme-colors);
$theme-color-interval: 8%;
$yiq-contrasted-threshold: 150;
$yiq-text-dark: darken($gray-900, 10%);
$yiq-text-light: $white;
//
//Global
//
$enable-caret: true;
$enable-rounded: true;
$enable-shadows: false;
$enable-gradients: false;
$enable-transitions: true;
$enable-hover-media-query: false;
$enable-grid-classes: true;
$enable-print-styles: true;
//
//Spacing
//
$spacer: 1rem;
$spacers: (0: 0, 1: ($spacer * .25), 2: ($spacer * .5), 3: $spacer, 4: ($spacer * 1.5), 5: ($spacer * 3), 6: ($spacer * 6), 7: ($spacer * 9), 8: ($spacer * 12), 9: ($spacer * 15));
$sizes: (25: 25%, 50: 50%, 75: 75%, 100: 100%);
//
//Body
//
$body-bg: $black;
$body-color: $gray-200;
//
//Links
//
$link-color: $primary;
$link-decoration: none;
$link-hover-color: darken($primary, 20%);
$link-hover-decoration: none;
//
//Paragraphs
//
$paragraph-margin-bottom: 1rem;
//
//GridBreakpoints
//
$grid-breakpoints: (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px);
//
//GridContainers
//
$container-max-widths: (sm: 540px, md: 720px, lg: 960px, xl: 1140px);
//
//GridColumns
//
$grid-columns: 12;
$grid-gutter-width: 30px;
//
//Components
//
$line-height-lg: 1.5;
$line-height-sm: 1.5;
$border-width: 2px;
$border-color: $gray-200;
$border-radius: .3rem;
$border-radius-lg: .4rem;
$border-radius-sm: .25rem;
$box-shadow-sm: 0 .125rem .25rem rgba($black, .075);
$box-shadow: 0 .5rem 1rem rgba($black, .15);
$box-shadow-lg: 0 1rem 3rem rgba($black, .175);
$component-active-color: $white;
$component-active-bg: theme-color("primary");
$caret-width: .3em;
$transition-base: all .25s ease-in-out;
$transition-fade: opacity .15s linear;
$transition-collapse: height .35s ease;
//
//Fonts
//
$font-family-sans-serif: "Inter UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
$font-family-base: $font-family-sans-serif;
$font-size-base: 1rem;
$font-size-lg: ($font-size-base * 1.25);
$font-size-sm: ($font-size-base * .875);
$font-weight-light: 300;
$font-weight-normal: 400;
$font-weight-bold: 700;
$font-weight-base: $font-weight-normal;
$line-height-base: 1.5;
$h1-font-size: $font-size-base * 3;
$h2-font-size: $font-size-base * 2.5;
$h3-font-size: $font-size-base * 1.5;
$h4-font-size: $font-size-base * 1.375;
$h5-font-size: $font-size-base * 1.25;
$h6-font-size: $font-size-base;
$headings-margin-bottom: $spacer;
$headings-font-family: inherit;
$headings-font-weight: $font-weight-bold;
$headings-line-height: 1.5;
$headings-color: $white;
$display1-size: 5rem;
$display2-size: 4.5rem;
$display3-size: 3.5rem;
$display4-size: 2.5rem;
$display1-weight: 300;
$display2-weight: 300;
$display3-weight: 300;
$display4-weight: 300;
$display-line-height: $headings-line-height;
$lead-font-size: ($font-size-base * 1.2);
$lead-font-weight: 500;
$small-font-size: 80%;
$text-muted: $gray-500;
$blockquote-small-color: $gray-500;
$blockquote-font-size: ($font-size-base * 1.25);
$hr-border-color: $gray-800;
$hr-border-width: $border-width;
$mark-padding: .2em;
$dt-font-weight: $font-weight-bold;
$kbd-box-shadow: inset 0 -.1rem 0 rgba($black, .25);
$nested-kbd-font-weight: $font-weight-bold;
$list-inline-padding: .5rem;
$mark-bg: #fcf8e3;
$hr-margin-y: $spacer;
//
//Tables
//
$table-cell-padding: .75rem;
$table-cell-padding-sm: .3rem;
$table-bg: transparent;
$table-accent-bg: rgba($black,.05);
$table-hover-bg: rgba($black,.075);
$table-active-bg: $table-hover-bg;
$table-border-width: $border-width;
$table-border-color: $gray-100;
$table-head-bg: $gray-100;
$table-head-color: $gray-700;
$table-dark-bg: $gray-900;
$table-dark-accent-bg: rgba($white, .05);
$table-dark-hover-bg: rgba($white, .075);
$table-dark-border-color: lighten($gray-900, 7.5%);
$table-dark-color: $body-bg;
$table-striped-order: odd;
$table-caption-color: $text-muted;
//
//Buttons
//
$input-btn-padding-y: .55rem;
$input-btn-padding-x: 1.5rem;
$input-btn-line-height: $line-height-base;
$input-btn-focus-width: .2rem;
$input-btn-focus-color: rgba(theme-color("primary"), .25);
$input-btn-focus-box-shadow: none;
$input-btn-padding-y-sm: .375rem;
$input-btn-padding-x-sm: 1rem;
$input-btn-line-height-sm: $line-height-sm;
$input-btn-padding-y-lg: .75rem;
$input-btn-padding-x-lg: 1.5rem;
$input-btn-line-height-lg: $line-height-lg;
$input-btn-border-width: $border-width;
$btn-padding-y: $input-btn-padding-y;
$btn-padding-x: $input-btn-padding-x;
$btn-line-height: $input-btn-line-height;
$btn-padding-y-sm: $input-btn-padding-y-sm;
$btn-padding-x-sm: $input-btn-padding-x-sm;
$btn-line-height-sm: $input-btn-line-height-sm;
$btn-padding-y-lg: $input-btn-padding-y-lg;
$btn-padding-x-lg: $input-btn-padding-x-lg;
$btn-line-height-lg: $input-btn-line-height-lg;
$btn-border-width: $input-btn-border-width;
$btn-font-weight: 500;
$btn-box-shadow: 0 2px 8px rgba($black, 0.1);
$btn-focus-width: $input-btn-focus-width;
$btn-focus-box-shadow: $input-btn-focus-box-shadow;
$btn-disabled-opacity: .65;
$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125);
$btn-link-disabled-color: $gray-600;
$btn-block-spacing-y: .5rem;
$btn-border-radius: $border-radius;
$btn-border-radius-lg: $border-radius-lg;
$btn-border-radius-sm: $border-radius-sm;
$btn-transition: all 0.2s;
//
//Forms
//
$label-margin-bottom: .5rem;
$input-padding-y: $input-btn-padding-y;
$input-padding-x: $input-btn-padding-x;
$input-line-height: $input-btn-line-height;
$input-padding-y-sm: $input-btn-padding-y-sm;
$input-padding-x-sm: $input-btn-padding-x-sm;
$input-line-height-sm: $input-btn-line-height-sm;
$input-padding-y-lg: $input-btn-padding-y-lg;
$input-padding-x-lg: $input-btn-padding-x-lg;
$input-line-height-lg: $input-btn-line-height-lg;
$input-bg: $white;
$input-disabled-bg: $gray-100;
$input-color: $gray-700;
$input-border-color: $border-color;
$input-border-width: $border-width;
$input-box-shadow: none;
$input-border-radius: $border-radius;
$input-border-radius-lg: $border-radius-lg;
$input-border-radius-sm: $border-radius-sm;
$input-focus-bg: $input-bg;
$input-focus-border-color: $primary;
$input-focus-color: $input-color;
$input-focus-width: $input-btn-focus-width;
$input-focus-box-shadow: $input-btn-focus-box-shadow;
$input-placeholder-color: $gray-500;
$input-plaintext-color: $body-color;
$input-height-border: $input-btn-border-width * 2;
$input-height-inner: ($font-size-base * $input-btn-line-height) + ($input-btn-padding-y * 2);
$input-height: calc(#{$input-height-inner} + #{$input-height-border});
$input-height-inner-sm: ($font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2);
$input-height-sm: calc(#{$input-height-inner-sm} + #{$input-height-border});
$input-height-inner-lg: ($font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2);
$input-height-lg: calc(#{$input-height-inner-lg} + #{$input-height-border});
$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
$form-text-margin-top: .25rem;
$form-check-input-gutter: 1.25rem;
$form-check-input-margin-y: .3rem;
$form-check-input-margin-x: .25rem;
$form-check-inline-margin-x: .75rem;
$form-check-inline-input-margin-x: .3125rem;
$form-group-margin-bottom: 1rem;
$input-group-addon-color: $white;
$input-group-addon-bg: $dark;
$input-group-addon-border-color: $dark;
$form-feedback-margin-top: $form-text-margin-top;
$form-feedback-font-size: $small-font-size;
$form-feedback-valid-color: theme-color("success");
$form-feedback-invalid-color: theme-color("danger");
//
//CustomForms
//
$custom-control-gutter: 1.75rem;
$custom-control-spacer-y: .25rem;
$custom-control-spacer-x: 1rem;
$custom-control-indicator-size: 1.125rem;
$custom-control-indicator-bg: $gray-100;
$custom-control-indicator-bg-size: 50% 50%;
$custom-control-indicator-box-shadow: inset 0 .25rem .25rem rgba($black,.1);
$custom-control-indicator-disabled-bg: $input-disabled-bg;
$custom-control-label-disabled-color: $gray-200;
$custom-control-indicator-checked-color: $white;
$custom-control-indicator-checked-bg: theme-color("primary");
$custom-control-indicator-checked-box-shadow: none;
$custom-control-indicator-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow;
$custom-control-indicator-active-color: $white;
$custom-control-indicator-active-bg: lighten(theme-color("primary"), 35%);
$custom-control-indicator-active-box-shadow: none;
$custom-checkbox-indicator-border-radius: $border-radius;
$custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23");
$custom-checkbox-indicator-indeterminate-bg: theme-color("primary");
$custom-checkbox-indicator-indeterminate-color: $custom-control-indicator-checked-color;
$custom-checkbox-indicator-icon-indeterminate: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23");
$custom-checkbox-indicator-indeterminate-box-shadow: none;
$custom-radio-indicator-border-radius: 50%;
$custom-radio-indicator-icon-checked: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3E%3C/svg%3E"), "#", "%23");
$custom-select-padding-y: .375rem;
$custom-select-padding-x: .75rem;
$custom-select-height: $input-height;
$custom-select-indicator-padding: 1rem;
$custom-select-line-height: $input-btn-line-height;
$custom-select-color: $input-color;
$custom-select-disabled-color: $gray-600;
$custom-select-bg: $input-bg;
$custom-select-disabled-bg: $input-disabled-bg;
$custom-select-bg-size: 8px 10px;
$custom-select-indicator-color: $gray-800;
$custom-select-indicator: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23");
$custom-select-border-width: $input-btn-border-width;
$custom-select-border-color: $input-border-color;
$custom-select-border-radius: $border-radius;
$custom-select-focus-border-color: $input-focus-border-color;
$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), $input-btn-focus-box-shadow;
$custom-select-font-size-sm: 75%;
$custom-select-height-sm: $input-height-sm;
$custom-select-font-size-lg: 125%;
$custom-select-height-lg: $input-height-lg;
$custom-range-track-width: 100%;
$custom-range-track-height: .5rem;
$custom-range-track-cursor: pointer;
$custom-range-track-bg: $gray-300;
$custom-range-track-border-radius: 1rem;
$custom-range-track-box-shadow: inset 0 .25rem .25rem rgba($black, .1);
$custom-range-thumb-width: 1rem;
$custom-range-thumb-height: $custom-range-thumb-width;
$custom-range-thumb-bg: $component-active-bg;
$custom-range-thumb-border: 0;
$custom-range-thumb-border-radius: 1rem;
$custom-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1);
$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-btn-focus-box-shadow;
$custom-range-thumb-active-bg: lighten($component-active-bg, 35%);
$custom-file-height: $input-height;
$custom-file-focus-border-color: $input-focus-border-color;
$custom-file-focus-box-shadow: $input-btn-focus-box-shadow;
$custom-file-padding-y: $input-btn-padding-y;
$custom-file-padding-x: $input-btn-padding-x;
$custom-file-line-height: $input-btn-line-height;
$custom-file-color: $gray-300;
$custom-file-bg: $input-bg;
$custom-file-border-width: $input-btn-border-width;
$custom-file-border-color: $dark;
$custom-file-border-radius: $input-border-radius;
$custom-file-box-shadow: $input-box-shadow;
$custom-file-button-color: $white;
$custom-file-button-bg: $input-group-addon-bg;
$custom-file-text: (en: "Browse");
//
//Dropdowns
//
$dropdown-min-width: 10rem;
$dropdown-padding-y: .75rem;
$dropdown-spacer: .125rem;
$dropdown-bg: $white;
$dropdown-border-color: $gray-100;
$dropdown-border-radius: $border-radius;
$dropdown-border-width: $border-width;
$dropdown-divider-bg: $gray-100;
$dropdown-box-shadow: 0 .5rem 1rem rgba($black,.175);
$dropdown-link-color: $gray-700;
$dropdown-link-hover-color: $gray-900;
$dropdown-link-hover-bg: $gray-100;
$dropdown-link-active-color: $component-active-color;
$dropdown-link-active-bg: $component-active-bg;
$dropdown-link-disabled-color: $gray-600;
$dropdown-item-padding-y: .25rem;
$dropdown-item-padding-x: 1.5rem;
$dropdown-header-color: $gray-400;
//
//ZindexMasterList
//
$zindex-dropdown: 1000;
$zindex-sticky: 1020;
$zindex-fixed: 1030;
$zindex-modal-backdrop: 1040;
$zindex-modal: 1050;
$zindex-popover: 1060;
$zindex-tooltip: 1070;
//
//Navs
//
$nav-link-padding-y: .25rem;
$nav-link-padding-x: 1rem;
$nav-link-disabled-color: $gray-400;
$nav-tabs-border-color: $gray-100;
$nav-tabs-border-width: $border-width;
$nav-tabs-border-radius: $border-radius;
$nav-tabs-link-hover-border-color: $gray-100 $gray-100 $nav-tabs-border-color;
$nav-tabs-link-active-color: $white;
$nav-tabs-link-active-bg: $dark;
$nav-tabs-link-active-border-color: $gray-200 $gray-200 $nav-tabs-link-active-bg;
$nav-pills-border-radius: $border-radius;
$nav-pills-link-active-color: $component-active-color;
$nav-pills-link-active-bg: $component-active-bg;
$nav-divider-color: $gray-200;
$nav-divider-margin-y: ($spacer / 2);
//
//Navbar
//
$navbar-padding-y: 1.5rem;
$navbar-padding-x: 1.25rem;
$navbar-nav-link-padding-x: .75rem;
$navbar-brand-font-size: $font-size-lg;
$nav-link-height: ($font-size-base * $line-height-base + $nav-link-padding-y * 2);
$navbar-brand-height: $navbar-brand-font-size * $line-height-base;
$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2;
$navbar-toggler-padding-y: .25rem;
$navbar-toggler-padding-x: .75rem;
$navbar-toggler-font-size: $font-size-lg;
$navbar-toggler-border-radius: $btn-border-radius;
$navbar-dark-color: rgba($white,.7);
$navbar-dark-hover-color: rgba($white,.9);
$navbar-dark-active-color: $white;
$navbar-dark-disabled-color: rgba($white,.3);
$navbar-dark-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23");
$navbar-dark-toggler-border-color: rgba($white,.1);
$navbar-light-color: rgba($black,.7);
$navbar-light-hover-color: rgba($primary,.9);
$navbar-light-active-color: $primary;
$navbar-light-disabled-color: rgba($black,.3);
$navbar-light-toggler-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23");
$navbar-light-toggler-border-color: rgba($black,.1);
//
//Pagination
//
$pagination-padding-y: .5rem;
$pagination-padding-x: .75rem;
$pagination-padding-y-sm: .25rem;
$pagination-padding-x-sm: .5rem;
$pagination-padding-y-lg: .75rem;
$pagination-padding-x-lg: 1.5rem;
$pagination-line-height: 1;
$pagination-color: $white;
$pagination-bg: $dark;
$pagination-border-width: 0px;
$pagination-border-color: transparent;
$pagination-focus-box-shadow: $input-btn-focus-box-shadow;
$pagination-focus-outline: 0;
$pagination-hover-color: $gray-100;
$pagination-hover-bg: $gray-600;
$pagination-hover-border-color: $gray-700;
$pagination-active-color: $white;
$pagination-active-bg: $gray-600;
$pagination-active-border-color: $gray-700;
$pagination-disabled-color: $white;
$pagination-disabled-bg: $gray-400;
$pagination-disabled-border-color: transparent;
//
//Jumbotron
//
$jumbotron-padding: 2rem;
$jumbotron-bg: $gray-100;
//
//Cards
//
$card-spacer-y: .75rem;
$card-spacer-x: 1.25rem;
$card-border-width: 0px;
$card-border-radius: $border-radius;
$card-border-color: rgba($black,.125);
$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width});
$card-cap-bg: rgba($black,.03);
$card-bg: $gray-900;
$card-img-overlay-padding: 1.25rem;
$card-group-margin: ($grid-gutter-width / 2);
$card-deck-margin: $card-group-margin;
$card-columns-count: 3;
$card-columns-gap: 1.25rem;
$card-columns-margin: $card-spacer-y;
//
//Tooltips
//
$tooltip-font-size: $font-size-sm;
$tooltip-max-width: 200px;
$tooltip-color: $white;
$tooltip-bg: $black;
$tooltip-border-radius: $border-radius;
$tooltip-opacity: .9;
$tooltip-padding-y: .25rem;
$tooltip-padding-x: .5rem;
$tooltip-margin: 0;
$tooltip-arrow-width: .8rem;
$tooltip-arrow-height: .4rem;
$tooltip-arrow-color: $tooltip-bg;
//
//Popovers
//
$popover-font-size: $font-size-sm;
$popover-bg: $white;
$popover-max-width: 276px;
$popover-border-width: $border-width;
$popover-border-color: rgba($black,.2);
$popover-border-radius: $border-radius-lg;
$popover-box-shadow: 0 .25rem .5rem rgba($black,.2);
$popover-header-bg: $dark;
$popover-header-color: $white;
$popover-header-padding-y: .65rem;
$popover-header-padding-x: .85rem;
$popover-body-color: $body-color;
$popover-body-padding-y: $popover-header-padding-y;
$popover-body-padding-x: $popover-header-padding-x;
$popover-arrow-width: 1rem;
$popover-arrow-height: .5rem;
$popover-arrow-color: $popover-bg;
$popover-arrow-outer-color: fade-in($popover-border-color, .05);
//
//Badges
//
$badge-font-size: 75%;
$badge-font-weight: $font-weight-bold;
$badge-padding-y: .35em;
$badge-padding-x: .5em;
$badge-border-radius: 4px;
$badge-pill-padding-x: .6em;
$badge-pill-border-radius: 10rem;
//
//Modals
//
$modal-inner-padding: 1.5rem;
$modal-dialog-margin: .5rem;
$modal-dialog-margin-y-sm-up: 1.75rem;
$modal-title-line-height: $line-height-base;
$modal-content-bg: $white;
$modal-content-border-color: $modal-content-bg;
$modal-content-border-width: $border-width;
$modal-content-border-radius: $border-radius-lg;
$modal-content-box-shadow-xs: 0 .25rem .5rem rgba($black, .5);
$modal-content-box-shadow-sm-up: 0 .5rem 1rem rgba($black, .5);
$modal-backdrop-bg: $black;
$modal-backdrop-opacity: .5;
$modal-header-border-color: $modal-content-bg;
$modal-footer-border-color: $modal-header-border-color;
$modal-header-border-width: $modal-content-border-width;
$modal-footer-border-width: $modal-header-border-width;
$modal-header-padding: 1.5rem;
$modal-lg: 800px;
$modal-md: 600px;
$modal-sm: 400px;
$modal-transition: transform .3s ease-out;
//
//Alerts
//
$alert-padding-y: .75rem;
$alert-padding-x: 1.5rem;
$alert-margin-bottom: 1rem;
$alert-border-radius: $border-radius;
$alert-link-font-weight: $font-weight-bold;
$alert-border-width: $border-width;
$alert-bg-level: -11;
$alert-border-level: -11;
$alert-color-level: 6;
//
//ProgressBars
//
$progress-height: 0.375rem;
$progress-font-size: ($font-size-base * .75);
$progress-bg: $gray-200;
$progress-border-radius: $border-radius;
$progress-box-shadow: inset 0 .1rem .1rem rgba($black,.1);
$progress-bar-color: $white;
$progress-bar-bg: theme-color("primary");
$progress-bar-animation-timing: 1s linear infinite;
$progress-bar-transition: width .6s ease;
//
//ListGroup
//
$list-group-bg: $white;
$list-group-border-color: rgba($black,.125);
$list-group-border-width: $border-width;
$list-group-border-radius: $border-radius;
$list-group-item-padding-y: .75rem;
$list-group-item-padding-x: 1.25rem;
$list-group-hover-bg: $gray-100;
$list-group-active-color: $component-active-color;
$list-group-active-bg: $component-active-bg;
$list-group-active-border-color: $list-group-active-bg;
$list-group-disabled-color: $gray-400;
$list-group-disabled-bg: $list-group-bg;
$list-group-action-color: $gray-700;
$list-group-action-hover-color: $list-group-action-color;
$list-group-action-active-color: $body-color;
$list-group-action-active-bg: $gray-100;
//
//Images
//
$thumbnail-padding: 0px;
$thumbnail-bg: $white;
$thumbnail-border-width: 2px;
$thumbnail-border-color: $gray-100;
$thumbnail-border-radius: $border-radius;
$thumbnail-box-shadow: 0 1px 2px rgba($black,.075);
//
//Figures
//
$figure-caption-font-size: 90%;
$figure-caption-color: $gray-400;
//
//Breadcrumbs
//
$breadcrumb-padding-y: .75rem;
$breadcrumb-padding-x: 1rem;
$breadcrumb-item-padding: .5rem;
$breadcrumb-margin-bottom: 1rem;
$breadcrumb-bg: $gray-100;
$breadcrumb-divider-color: $gray-400;
$breadcrumb-active-color: $gray-400;
$breadcrumb-divider: "/";
$breadcrumb-border-radius: $border-radius;
//
//Carousel
//
$carousel-control-color: $white;
$carousel-control-width: 15%;
$carousel-control-opacity: .5;
$carousel-indicator-width: 30px;
$carousel-indicator-height: 3px;
$carousel-indicator-spacer: 3px;
$carousel-indicator-active-bg: $white;
$carousel-caption-width: 70%;
$carousel-caption-color: $white;
$carousel-control-icon-width: 20px;
$carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23");
$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23");
$carousel-transition: transform .6s ease;
//
//Close
//
$close-font-size: $font-size-base * 2;
$close-font-weight: $font-weight-bold;
$close-color: $black;
$close-text-shadow: 0 1px 0 $white;
//
//Code
//
$code-font-size: 87.5%;
$code-color: $pink;
$kbd-padding-y: .2rem;
$kbd-padding-x: .4rem;
$kbd-font-size: $code-font-size;
$kbd-color: $white;
$kbd-bg: $gray-900;
$pre-color: $gray-900;
$pre-scrollable-max-height: 340px;
$print-page-size: a3;
$print-body-min-width: map-get($grid-breakpoints, "lg");
//
//Extra SASS variables
//
$link-border-width: 0px;
$link-border-style: solid;
$link-border-color: transparent;
$link-hover-border-width: 0px;
$link-hover-border-style: solid;
$link-hover-border-color: transparent;
$link-font-size: inherit;
$link-font-weight: inherit;
$link-background-color: transparent;
$link-hover-background-color: transparent;
$link-footer-color: $link-color;
$link-footer-decoration: $link-decoration;
$link-footer-hover-color: $link-hover-color;
$link-footer-hover-decoration: $link-hover-decoration;
$paragraph-color: inherit;
$paragraph-bold-text-weight: bolder;
$paragraph-bold-text-color: inherit;
$btn-text-transform: none;
$btn-font-size: $font-size-base;
$btn-font-size-lg: $font-size-lg;
$btn-font-size-sm: $font-size-sm;
$btn-background-image: none;
$btn-hover-background-image: none;
$navbar-nav-link-padding-y: 0.5rem;
$navbar-nav-link-text-transform: none;
$navbar-nav-link-font-size: inherit;
$navbar-nav-link-font-weight: inherit;
+64
View File
@@ -0,0 +1,64 @@
APP_NAME=cleftlipdata
APP_ENV=local
APP_KEY=base64:V30Y35f4cQLBTxSOrbP3BzwHVoCH+qfqXKnlbR48ZNI=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=localhost #https://cleftlip.2233322.xyz #https://cleftlipdata.humicprototyping.com
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
BCRYPT_ROUNDS=12
LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=kp
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=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=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}"

Some files were not shown because too many files have changed in this diff Show More