Download the PHP package asciisd/nova-chat without Composer

On this page you can find all versions of the php package asciisd/nova-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nova-chat

asciisd/nova-chat

Latest Version on Packagist Total Downloads PHP Version

A reusable, contract-driven WhatsApp-style chat tool for Laravel Nova.

The package never assumes a single shared chat_messages table. Each project plugs in its own host model (a "topic"), its own message model, and its own author models. Everything connects through three small interfaces.

Requirements

Installation

The package ships its own auto-loaded migration for the nova_chat_blocked_participants table that backs admin moderation — no vendor:publish step is required for it.

Register the tool in app/Providers/NovaServiceProvider.php:

Build the Vue bundle inside the package:

(If you're consuming via a path repo / monorepo, build inside the package source directory once and rebuild when you change Vue files.)

How it works

The package provides three interfaces. Implement them on your models — the package never references domain classes directly.

1. The host model (the "thread")

2. The message model

is_from_admin is auto-derived

You do not need to set is_from_admin yourself when inserting messages — the AsChatMessage trait fills it from the author at insert time:

The trait only auto-derives when is_from_admin is not in the assigned attributes, so any value you explicitly pass is kept. Cost: one extra SELECT against the author table per creating event.

Required columns on your message table

Column Type Notes
id bigint pk standard
FK to host bigint name is flexible (signal_id, ticket_id, …)
author_type / author_id polymorphic morph $table->morphs('author')
body text message content
is_from_admin bool, default false set at write time; cheap unread queries
read_at timestamp nullable read receipts
created_at / updated_at timestamps sidebar ordering + relative time

Recommended optional: reference (ulid), attachments (json).

Recommended for moderation (required if you want soft-delete via the admin endpoint): deleted_at ($table->softDeletes()), deleted_by_type / deleted_by_id ($table->nullableMorphs('deleted_by')), and deletion_reason (text nullable). Without deleted_at + the SoftDeletes trait on your message model, DELETE /messages/{id} returns a 422 with an actionable error.

Recommended indexes: (fk, created_at) and (fk, is_from_admin, read_at).

A reference migration is shipped in database/stubs/chat_messages_table.stub, and you can scaffold a fresh one in seconds:

Pass arguments to skip the prompts:

3. Author models (Admin / User / Customer / …)

4. Register the topic in config/nova-chat.php

Add more topics any time — the sidebar grows a tab switcher automatically.

The sidebar's search box filters by title and reference on whichever topic is active.

API surface (admin auth required)

All routes live under /nova-vendor/nova-chat/ and are protected by Nova's API middleware (which resolves the configured admin_guard):

Method Path
GET /topics
GET /topics/{topic}/conversations
GET /topics/{topic}/conversations/{id}/messages
POST /topics/{topic}/conversations/{id}/messages
DELETE /topics/{topic}/conversations/{id}/messages/{message}
POST /topics/{topic}/conversations/{id}/read
GET /blocks
POST /blocks
DELETE /blocks/{participant_type}/{participant_id}

Moderation

Two admin abilities, both opt-in via config('nova-chat.moderation'):

Both abilities can be turned off without a code change:

Laravel Boost integration

This package ships AI guidelines and skills for Laravel Boost:

Run php artisan boost:install (or boost:update --discover after composer require) to publish them into the consuming app.

v1 caveats

License

MIT — see LICENSE.


All versions of nova-chat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/nova Version ^4.0|^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asciisd/nova-chat contains the following files

Loading the files please wait ...