-
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Laravel Safeguard is a powerful security auditing package for Laravel applications. Follow this guide to get it installed and configured in your project.
- PHP: 8.3 or higher
- Laravel: 12.19 or higher
Install Laravel Safeguard using Composer:
composer require --dev grazulex/laravel-safeguardπ‘ Note: We recommend installing this as a development dependency since it's primarily used for auditing and CI/CD processes.
Publish the configuration file to customize the security rules:
php artisan vendor:publish --tag=safeguard-configThis will create a config/safeguard.php file in your Laravel application with all available security rules.
Verify the installation by running:
php artisan safeguard:listThis should display all available security rules like:
π‘οΈ Available Security Rules:
βββββββββββββββββββββββββββββββββββββββ
Environment & Configuration:
β app-debug-false-in-production
β env-has-all-required-keys
β app-key-is-set
β no-secrets-in-code
Security Rules:
β csrf-enabled
β composer-package-security
...
Run your first security check:
php artisan safeguard:checkNow that you have Laravel Safeguard installed, here's what to do next:
- β‘ Quick Start Guide - Run your first security check
- βοΈ Configuration Guide - Configure your security rules
- π Rules Reference - Learn about available security rules
- π CI/CD Integration - Set up automated security checks
composer require --dev grazulex/laravel-safeguard
php artisan vendor:publish --tag=safeguard-configFor projects with complex setups, you may need additional configuration:
# Install the package
composer require --dev grazulex/laravel-safeguard
# Publish configuration
php artisan vendor:publish --tag=safeguard-config
# Clear caches to ensure proper loading
php artisan config:clear
php artisan cache:clearWhile primarily designed for Laravel, you can use the core security rules in any PHP project:
composer require grazulex/laravel-safeguardThen manually configure the rules and services as needed.
If you encounter Composer issues:
# Clear Composer cache
composer clear-cache
# Update Composer
composer self-update
# Install with verbose output
composer require --dev grazulex/laravel-safeguard -vvvLaravel Safeguard uses package auto-discovery. If you need to manually register the service provider:
// config/app.php
'providers' => [
// ...
Grazulex\LaravelSafeguard\LaravelSafeguardServiceProvider::class,
],Ensure your storage directories are writable:
chmod -R 755 storage/
chmod -R 755 bootstrap/cache/If you're having issues with configuration caching:
php artisan config:clear
php artisan config:cacheTo update to the latest version:
composer update grazulex/laravel-safeguardAfter updating, republish the configuration if there are new options:
php artisan vendor:publish --tag=safeguard-config --force- PHP 8.3+ installed
- Laravel 12.19+ project
- Package installed via Composer
- Configuration published
- Installation verified with
safeguard:list - First security check run successfully
If you encounter any issues during installation:
- Check the π Troubleshooting guide
- Review the β FAQ for common questions
- Open an issue on the GitHub repository
Next Step: β‘ Run your first security check with our Quick Start Guide
π Home | β‘ Quick Start | βοΈ Configuration | π Rules Reference
Laravel Safeguard - Configurable Security Checks for Laravel Applications
π Home | π¦ Installation | β‘ Quick Start | π‘ Examples | π Full Docs
Made with β€οΈ for the Laravel community
Β© 2025 - Laravel Safeguard by Grazulex