1. Create a new Laravel project

composer create-project laravel/laravel TextstemDevelop
cd TextstemDevelop
npm install && npm run build
php artisan serve

2. Add the Textstem package

If using the GitHub repository:

Add the repository to your composer.json:

"repositories": [
  {
    "type": "vcs",
    "url":  "git@github.com:MeccaMedialight/textstem-laravel.git"
  }
]

Then require the package (You may need to change the "minimum-stability" value to "dev" to use the latest textstem):

composer require medialight/textstem-laravel:dev-main

If developing locally:

Clone the repo and add a path repository to your composer.json:

"repositories": [
  {
    "type": "path",
    "url":  "../packages/medialight/textstem-laravel",
    "symlink": true
  }
],

Then require the package as above.

3. Configure your .env

Set up your database and (optionally) OpenAI API key:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=textstem9db
DB_USERNAME=textstem9usr
DB_PASSWORD=

DB_SERVER_TYPE=mariadb

OPENAI_API_KEY=your-openai-key

4. Publish assets and components

If you haven't already, run the post-install command:

php artisan textstem:post-install

Follow the prompts to select your frontend stack.

5. Migrate the database

php artisan migrate

If you wish to run textstem's seeders (to install an admin user and create a sample page and content), call them from your main application's database/seeders/DatabaseSeeder.php file.

<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Medialight\Textstem\Database\Seeders\DatabaseSeeder as TextstemDatabaseSeeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        // ...

        $this->call([
            // Other application seeders
            TextstemDatabaseSeeder::class, // Call your package seeder
        ]);
    }
}

And then run the seeder ...

 php artisan db:seed

6. Refresh assets after updates

php artisan textstem:refresh-assets

Add this to your composer.json post-update-cmd and post-install-cmd to automate asset refresh.

See the docs/ci-cd.md and in-file instructions for queue and websocket setup.

Nextsteps

If you installed a Laravel Starter Kit, there will be routes for welcome and the dashboard. You can delete these if you want to use Textstem to manage these pages.