This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Running optimized post-merge hook..." | |
# Check for new migration files | |
if git diff --name-only HEAD@{1} HEAD | grep -qE '^database/migrations/.*\.php'; then | |
echo "New migrations found. Running database migrations..." | |
php artisan migrate --force | |
else | |
echo "No new migrations found. Skipping migration step." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Check if any files in the routes folder were changed | |
if git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep -q '^routes/'; then | |
echo "Changes detected in routes folder. Running php artisan route:cache..." | |
cd ../../ | |
php artisan route:cache | |
else | |
echo "No changes in routes folder." | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("START_TIME", hrtime(true)); | |
const COLOR_GREEN = "\033[32m"; | |
const COLOR_WHITE = "\033[97m"; | |
const BG_BLUE = "\033[44m"; | |
const COLOR_RESET = "\033[0m"; | |
const BG_RESET = "\033[49m"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^public | |
RewriteRule ^(.*)$ public/$1 [L] |