Skip to content

Installation ​

Requirements ​

  • PHP >= 8.2
  • Laravel 10, 11, 12
  • MySQL 8.0+ / PostgreSQL 9.2+
  • exif PHP extension (on most systems it will be installed by default)
  • intl PHP extension (on most systems it will be installed by default)
  • bcmath PHP extension (on most systems it will be installed by default)
  • GD PHP extension (used for image manipulation)

Install Pyle ​

Composer Require Package ​

sh
composer require pylesoft/pyle:"^1.0.0-beta" -W

TIP

You may need to update your app's composer.json to set "minimum-stability": "dev",

Add the PyleUser Trait ​

Some parts of the core rely on the User model having certain relationships set up. We have bundled these into a trait and an interface, which you must add to any models that represent users in your database.

php
use Pyle\Base\Traits\PyleUser;
use Pyle\Base\PyleUser;
// ...

class User extends Authenticatable implements PyleUser
{
    use PyleUser;
    // ...
}

Publish Configuration ​

Before you run the Pyle installer command, you may wish to customise some of the set-up.

sh
php artisan vendor:publish --tag=pyle

Configure Laravel Scout ​

Pyle works best with Laravel Scout and a search engine like Meilisearch, Typesense or Algolia.

If you do NOT have a search engine configured ​

Add the following to your .env file.

SCOUT_DRIVER=null

And set the config value in panel.php as follows.

php
    'scout_enabled' => false,

Install the Admin Panel ​

The React and Inertia Admin Panel is provided by the pylesoft/admin package. Composer's Laravel package discovery registers Pyle\AdminPanel\AdminPanelServiceProvider; no manual provider or facade registration is required.

sh
composer require pylesoft/admin

The panel uses the admin-panel.* route names and config/admin-panel.php configuration. See local development for the monorepo path-repository setup.

Run the Artisan Installer ​

sh
php artisan pyle:install

This will take you through a set of questions to configure your Pyle install. The process includes...

  • In local and development environments, building or updating config/pyle.php from interactive prompts while preserving existing config entries
  • Creating a default admin user (if required)
  • Seeding initial data
  • Inviting you to star our repo on GitHub ⭐

When the app is running in staging or production-style environments, the config builder prompts are skipped and the installer continues with migrations and default setup tasks.

You should now be able to access the panel at https://<yoursite>/admin.

Advanced Installation Options ​

Table Prefix ​

Pyle uses table prefixes to avoid conflicts with your app's tables. You can change this in the configuration.

User ID Field Type ​

Pyle assumes your User ID field is a "BIGINT". If you are using an "INT" or "UUID", you will want to update the configuration in config/pyle/database.php to set the correct field type before running the migrations.

Publish Migrations ​

You can optionally publish Pyle's migrations so they're added to your Laravel app.

sh
php artisan vendor:publish --tag=pyle.migrations