rekhu
← All news

Rekhu Assistant examples, and routes in your own file

A small shop wired up file by file for Laravel and Node.js, a guide to writing good actions, and the assistant's Laravel routes in your own route file.

By Rekhu 1 min read Rekhu Builder 0.6.0

Complete examples. Each package now has an examples/ folder on GitHub: a small shop with orders, wired up file by file. For Laravel: a controller with one action of each kind (a list with filters, one record, a change through a form request, a cancel the user confirms, an action for visitors), the service provider, a config, help topics, a Blade layout and a Nuxt chat of your own. For Node.js: the same shop on Express, with a React chat. Copy what you need; the folders are not part of what Composer or npm installs.

Writing good actions. A new section in both READMEs on what decides how well the assistant works: a description that says what comes back and when to use it, a short label for the user, stable names, reading before changing, confirmation, and where help, project knowledge and instructions go.

Routes in your own file. In Laravel, REKHU_ASSISTANT_ROUTES=false stops the package from registering its routes, and RekhuAssistant::routes([...]) puts them in your own route file, inside your own group, the way Broadcast::routes() works: your domain, prefix such as api/v2, middleware and name prefix.

Versions: rekhu/assistant-laravel 0.6.0 and @rekhu/assistant-node 0.3.3.

Share LinkedIn X

Related

More on the same topics

  • Keys per product, on the Connection tab

    A new project no longer comes with a key. You make the key for what you connect, Rekhu Builder or Rekhu Assistant, on the project's Connection tab.

  • Knowledge for every assistant

    The knowledge you write in a project now reaches Rekhu Assistant on every answer, and Node.js projects get a Knowledge tab for it.

  • What your users read while the assistant works

    An action's label is what users see while it runs and on its cards; the description you write for the assistant is never shown to them.

Try Rekhu Builder on your site

Create a free account, connect a site, drop in a template. Converting is free; only the chat draws from the credit.