PHPackages                             ollieread/laravel-starter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ollieread/laravel-starter

ActiveProject[Framework](/categories/framework)

ollieread/laravel-starter
=========================

An opinionated Laravel starter kit.

v1.3-beta(1mo ago)111MITBladePHP ^8.5

Since Jan 3Pushed 1mo agoCompare

[ Source](https://github.com/ollieread/laravel-starter)[ Packagist](https://packagist.org/packages/ollieread/laravel-starter)[ RSS](/packages/ollieread-laravel-starter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (24)Versions (5)Used By (0)

Laravel Starter Kit
===================

[](#laravel-starter-kit)

An opinionated Laravel starter kit by [Ollie Read](https://github.com/ollieread), designed to skip the boilerplate process of setting up a new Laravel project.

Requirements
------------

[](#requirements)

- PHP 8.5+
- Composer
- Docker
- Node.js &amp; NPM

Installation
------------

[](#installation)

### Using the Laravel Installer

[](#using-the-laravel-installer)

```
laravel new your-project-name --using=ollieread/laravel-starter
```

### Using Composer

[](#using-composer)

```
composer create-project ollieread/laravel-starter your-project-name
cd your-project-name
composer setup
```

Quick Start
-----------

[](#quick-start)

Start the development environment with a single command:

```
composer dev
```

This runs concurrently:

- Docker containers via Sail (`sail up`) - includes queue worker
- Log viewer via Pail (`php artisan pail`)
- Vite dev server (`npm run dev`)

What's Different?
-----------------

[](#whats-different)

This starter kit makes several opinionated changes from the default Laravel installation:

### Routing

[](#routing)

Routes are no longer defined in the `routes/` directory. Instead, they use an object-first approach with classes implementing `App\Support\RouteMapper`:

```
// app/Http/Routes/DefaultRoutes.php
final class DefaultRoutes implements RouteMapper
{
    public function map(Router $router): void
    {
        $router->get('/', fn () => view('welcome'));
    }
}
```

Route mappers are registered in `app/Boot/ConfigureRouting.php`:

```
private static array $mappers = [
    'web' => [
        DefaultRoutes::class,
    ],
    // Add 'api' => [...] for API routes
];
```

### Application Bootstrap

[](#application-bootstrap)

The `app/Boot/` directory contains classes for configuring:

- `ConfigureRouting.php` - Route registration
- `ConfigureMiddleware.php` - Middleware configuration
- `ConfigureExceptions.php` - Exception handling

### Configuration

[](#configuration)

- All framework config files are published to `config/`
- The framework is told **not** to merge default configuration (`dontMergeFrameworkConfiguration()`)
- This gives you explicit control over every configuration value

### Database

[](#database)

- **PostgreSQL** is the default database
- The `tpetry/laravel-postgresql-enhanced` package is installed for enhanced PostgreSQL support
- Migration stubs use PostgreSQL-enhanced Blueprint for additional column types and features
- SQLite, MySQL, and MariaDB configurations are also available

### Frontend

[](#frontend)

- **SCSS** instead of Tailwind CSS
- Entry point: `resources/scss/app.scss`
- Vite configured with SCSS compilation
- Axios pre-configured with CSRF token handling

### Development Tools

[](#development-tools)

Pre-installed and configured:

- **Telescope** - Debugging and monitoring (non-production only)
- **IDE Helper** - Auto-generates IDE metadata for autocompletion
- **Pail** - Elegant log viewer
- **Larastan** - Static analysis at maximum level

### Other Changes

[](#other-changes)

- Default migrations removed (except Telescope)
- Stubs published to `stubs/`
- Daily log rotation enabled
- Sessions, cache default to file-based storage
- Queue defaults to sync processing
- `app/Http/Controllers` directory removed

Available Commands
------------------

[](#available-commands)

### Composer Scripts

[](#composer-scripts)

CommandDescription`composer setup`Full project initialization`composer dev`Run concurrent development servers`composer test`Run test suite`composer static`Run PHPStan static analysis`composer ide-helper`Generate IDE helper files`composer ide-helper:models`Generate model mixins### NPM Scripts

[](#npm-scripts)

CommandDescription`npm run dev`Start Vite development server`npm run build`Build for productionDirectory Structure
-------------------

[](#directory-structure)

```
app/
├── Boot/                    # Application bootstrap configuration
│   ├── ConfigureRouting.php
│   ├── ConfigureMiddleware.php
│   └── ConfigureExceptions.php
├── Http/
│   └── Routes/              # Route mapper classes
│       └── DefaultRoutes.php
├── Models/
├── Providers/
│   ├── AppServiceProvider.php
│   ├── DevServiceProvider.php      # Development-only providers
│   └── TelescopeServiceProvider.php
└── Support/
    └── RouteMapper.php      # Route mapper interface

resources/
├── js/
│   ├── app.js
│   └── bootstrap.js
├── scss/
│   └── app.scss
└── views/

stubs/                       # Published stub files

```

Adding Routes
-------------

[](#adding-routes)

1. Create a new route mapper in `app/Http/Routes/`:

```
