laravel-security

Implement Laravel security best practices for authentication, CSRF, and deployment hardening.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/espensev/ai-skills --skill laravel-security-espensev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-security
Source: https://github.com/espensev/ai-skills/tree/main/gemini-skills/skills/laravel-security
Command: npx skills add https://github.com/espensev/ai-skills --skill laravel-security-espensev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel security best practices to harden apps and protect against common vulnerabilities.

Core Features & Use Cases

  • Authentication & authorization hardening: enforce access controls and secure tokens
  • CSRF, validation, and input sanitization: protect forms and APIs
  • Secure deployment defaults: enforce environment and header security in production

Quick Start

Apply Laravel security best practices to harden authentication, CSRF, and deployments.

Frequently Asked Questions about laravel-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Laravel authentication and authorization best practices?

Laravel authentication and authorization best practices are enforced by configuring secure access controls and guarding tokens. This ensures only authorized users access protected application routes.

What's the best way to protect Laravel forms and APIs from CSRF attacks?

Protecting Laravel forms and APIs from CSRF attacks involves implementing built-in CSRF protection tokens. This validates form requests and secures APIs against cross-site request forgery vulnerabilities.

How do I set up secure deployment defaults for a Laravel web app?

Secure deployment defaults for a Laravel web app are established by enforcing strict environment configurations and security headers. This hardens production environments against common vulnerabilities.

How does Laravel input validation and sanitization work for API endpoints?

Laravel input validation and sanitization works by applying form requests to API endpoints. This automatically validates incoming data before processing, preventing malicious or malformed input.

Can I use encrypted attributes and signed URLs to secure Laravel routes?

You can use encrypted attributes and signed URLs to secure Laravel routes. This prevents tampering with sensitive data and ensures generated links remain authentic and unaltered.