Skip to content

Releases: BinarCode/laravel-restify

8.1.0

14 Apr 11:58
a4daf34
Compare
Choose a tag to compare

8.0.1

14 Apr 10:12
8b2e4ae
Compare
Choose a tag to compare

Fixed

  • docs for getters #554

8.0.0

06 Apr 09:27
aeaa35c
Compare
Choose a tag to compare

Added

  • Support for Laravel 10 #540
  • Introduces a new option to publish specific auth actions #551
  • Take actionable fields into account when calling patch method #547
  • Custom namespaces support #549
  • New artisan restify:routes comment
  • Updated the documentation https://restify.binarcode.com/
  • 💯 - 💯 - 💯 - 💯

Improved

  • Larastan specs

7.11.0

16 Mar 07:45
bb9359b
Compare
Choose a tag to compare

Added

  • Support for actionable fields on PATCH method #547

thanks @dsindrilaru

7.10.11

12 Feb 17:58
Compare
Choose a tag to compare

Added

  • Now you can use the permission name for the field see authorization:
field('user_id')->canSeeWhen('can manage users'),

7.10.4

11 Feb 21:11
Compare
Choose a tag to compare

Fixed

  • Do not display hidden pivots.

7.10.3

11 Feb 20:57
f7942c6
Compare
Choose a tag to compare

Fixed

  • fix: do not filter belongs to many fields

7.10.2

04 Feb 10:17
20749fc
Compare
Choose a tag to compare

Fixed

  • Return a collection with only its values, without any keys or indexes (if it's an associative array). #524

7.10.1

04 Feb 09:46
Compare
Choose a tag to compare

Fixed

  • Show the full path for the file when suggesting OpenAI solution.

7.10.0

04 Feb 09:26
7f14144
Compare
Choose a tag to compare

Inspired and thanks to Marcel for the article: https://beyondco.de/blog/ai-powered-error-solutions-for-laravel

Generate solution

Restify can generate an AI based solution to your problem. In order to enable that you need to extend the App\Exceptions\Handler with the Binaryk\LaravelRestify\Exceptions\RestifyHandler:

use Binaryk\LaravelRestify\Exceptions\RestifyHandler;
use Throwable;

class Handler extends RestifyHandler
{
    //...
}
This feature is only enabled when the `app.debug` is set to `true`.

This feature is using the openai-php/laravel, you should also publish the config file:

php artisan vendor:publish --provider="OpenAI\Laravel\ServiceProvider"

and set the OPENAI_API_KEY in the .env file.

The OpenAI key can be obtained from here.

Now the solution to your problems will automatically appear in the response:

{
    "restify-solution": "Line 67 in DocumentRepository.php file has an error because the method `resolveUsingFullPath()` is not defined. The code should look like this:\n```\n->resolveUsingTemporaryUrl($request->boolean('temporary'))\n```\n",
    "message": "Call to undefined method Binaryk\\LaravelRestify\\Fields\\File::resolveUsingFullPath()",
    "exception": "Error",
    "file": "/Users/eduardlupacescu/Sites/binarcode/erp/app/Restify/DocumentRepository.php",
    "line": 67,
    "trace": [
...
}

Disable solution

If you want to disable the solution feature you can set the restify.ai_solution to false in the config/restify.php file so Restify will not call the OpenAI API even you extended the exception handler. This might be useful in automated tests or other environments:

// config/restify.php
'ai_solutions' => true,