PHPackages                             articlai/articlai-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. articlai/articlai-laravel

ActiveLibrary[Admin Panels](/categories/admin)

articlai/articlai-laravel
=========================

Package to allow blog publishing in Laravel using Articlai

v1.0.6(10mo ago)010[3 PRs](https://github.com/articlai/articlai-laravel/pulls)MITPHPPHP ^8.3CI passing

Since Jul 21Pushed 2mo agoCompare

[ Source](https://github.com/articlai/articlai-laravel)[ Packagist](https://packagist.org/packages/articlai/articlai-laravel)[ Docs](https://github.com/articlai/articlai-laravel)[ GitHub Sponsors](https://github.com/Articlai)[ RSS](/packages/articlai-articlai-laravel/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (9)Versions (13)Used By (0)

ArticlAI Laravel Package
========================

[](#articlai-laravel-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9a4750c5df6380b7ad71d35727fd3e852ae1a0af1318e15f2bf3a37f8ec64feb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61727469636c61692f61727469636c61692d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/articlai/articlai-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/2d45ff772d6376d620b546f3f0a0436f10419776bccd25c76a3ace63f41bdd2e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61727469636c61692f61727469636c61692d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/articlai/articlai-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f76f6d5f9faad5a188642d003b17a7edbe35411ee4e36ce2f79dbfb440dc4258/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61727469636c61692f61727469636c61692d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/articlai/articlai-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/83f5963b2c6e5f953655619b2da030c13c437d42ea8eed548f49ee634610dc25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61727469636c61692f61727469636c61692d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/articlai/articlai-laravel)

A Laravel package that enables seamless integration with ArticlAI's Custom API connection type. This package provides secure API endpoints that allow ArticlAI to create, update, and delete blog posts in your Laravel application.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require articlai/articlai-laravel
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="articlai-laravel-migrations"
php artisan vendor:publish --tag="medialibrary-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="articlai-laravel-config"
```

Configuration
-------------

[](#configuration)

After publishing the config file, update your `.env` file with your ArticlAI settings:

```
# Authentication Method (api_key, bearer_token, or basic_auth)
ARTICLAI_AUTH_METHOD=api_key
ARTICLAI_API_KEY=your-secret-api-key
```

API Endpoints
-------------

[](#api-endpoints)

The package provides the following endpoints for ArticlAI integration:

### Validation Endpoint

[](#validation-endpoint)

```
GET /api/articlai/validate

```

Returns platform information and validates the connection.

### Content Management

[](#content-management)

```
POST /api/articlai/posts          # Create a new post
GET /api/articlai/posts/{id}      # Get a specific post
PUT /api/articlai/posts/{id}      # Update a post
DELETE /api/articlai/posts/{id}   # Delete a post

```

### Banner Images

[](#banner-images)

The package supports banner images through Spatie Media Library integration. When creating or updating posts, you can include banner image URLs:

```
{
  "title": "Blog Post Title",
  "content": "Post content",
  "banner_image": "https://example.com/image.jpg",
  "banner_original": "https://example.com/original.jpg"
}
```

The package will automatically download and store the images, creating multiple conversions:

- **thumbnail**: 150x150px (cropped)
- **medium**: 300x300px (cropped)
- **large**: 800x600px (cropped)
- **original**: Original image

Usage
-----

[](#usage)

### Using the Service Class

[](#using-the-service-class)

```
use Articlai\Articlai\Articlai;

$articlai = app(Articlai::class);

// Create a post with banner image
$post = $articlai->createPost([
    'title' => 'My Blog Post',
    'content' => 'This is the content',
    'excerpt' => 'Post excerpt',
    'status' => 'published',
    'banner_image' => 'https://example.com/banner.jpg'
]);

// Update a post
$updatedPost = $articlai->updatePost($post->id, [
    'title' => 'Updated Title'
]);

// Get posts
$posts = $articlai->getPosts(['status' => 'published']);
```

### Using the Facade

[](#using-the-facade)

```
use Articlai\Articlai\Facades\Articlai;

$post = Articlai::createPost([
    'title' => 'My Blog Post',
    'content' => 'This is the content'
]);
```

### Using the Model Directly

[](#using-the-model-directly)

```
use Articlai\Articlai\Models\ArticlaiPost;

$post = ArticlaiPost::create([
    'title' => 'My Blog Post',
    'content' => 'This is the content',
    'status' => 'published'
]);

// Get published posts
$publishedPosts = ArticlaiPost::published()->get();

// Access banner images
$post = ArticlaiPost::find(1);
echo $post->banner_image;      // Large version URL
echo $post->banner_thumbnail;  // Thumbnail URL
echo $post->banner_medium;     // Medium URL
echo $post->banner_large;      // Large URL
echo $post->banner_original;   // Original URL
```

Command Line Interface
----------------------

[](#command-line-interface)

Check the package status and view recent posts:

```
php artisan articlai:status --posts=10
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [ArticlAI](https://github.com/articlai)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance71

Regular maintenance activity

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

7

Last Release

326d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/220966308?v=4)[Articlai](/maintainers/Articlai)[@articlai](https://github.com/articlai)

---

Top Contributors

[![Stijnbak](https://avatars.githubusercontent.com/u/24252568?v=4)](https://github.com/Stijnbak "Stijnbak (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelArticlaiarticlai-laravel

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/articlai-articlai-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/articlai-articlai-laravel/health.svg)](https://phpackages.com/packages/articlai-articlai-laravel)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M101](/packages/dedoc-scramble)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[filament/support

Core helper methods and foundation code for all Filament packages.

2331.0M245](/packages/filament-support)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

213421.2k2](/packages/wnx-laravel-backup-restore)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
