Laravel Template screenshot

Laravel Template

Updated: 3 Feb 2023
56 Stars

An opinionated Laravel setup using my favourite tools

Categories

Overview

The Opinionated Laravel Template is a preconfigured template designed for Laravel projects. Created with the author’s preferred conventions in mind, it offers a streamlined starting point for developers to work with.

Features

  • Opinionated: The template follows the specific conventions preferred by the author, providing a consistent framework for development.
  • Pest PHP: The template includes Pest PHP, a testing framework for PHP that emphasizes readability and simplicity.
  • Pest Parallel: Pest Parallel, a parallel testing executor for Pest PHP, is also included, allowing for faster and more efficient testing.
  • Laravel Pint: Laravel Pint, a command line tool that assists with package management, is integrated into the template, simplifying the process of working with Laravel packages.
  • LaraStan: The template incorporates LaraStan, a static analysis tool for Laravel, helping developers catch and fix errors early in the development process.
  • Safe PHP: Safe PHP, a PHP linter, is also included in the template, ensuring code quality by highlighting potential issues and suggesting improvements.
  • Tailwind CSS: The template is preconfigured with Tailwind CSS, a utility-first CSS framework, making it easy to create custom and responsive designs.

Installation

To use the Opinionated Laravel Template, follow these steps:

  1. Use Composer to create a new Laravel project with the template:

    composer create-project author/template
    
  2. Once the project is created, navigate to its directory:

    cd project-directory
    
  3. Install the dependencies:

    composer install
    
  4. Configure the database connection in the .env file.

  5. Generate the application key:

    php artisan key:generate
    
  6. Run database migrations:

    php artisan migrate
    
  7. The template is now ready to use.

Summary

The Opinionated Laravel Template is a preconfigured template for Laravel projects that incorporates various tools and conventions preferred by the author. It aims to provide a consistent and efficient starting point for development, with features such as Pest PHP for testing, Laravel Pint for package management, LaraStan for static analysis, Safe PHP for linting, and Tailwind CSS for easy styling. By following the installation guide, developers can quickly set up the template and start working on their Laravel project.