PHPackages                             turahe/post - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. turahe/post

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

turahe/post
===========

A package for managing posts.

1.3.1(8mo ago)039MITPHPPHP ^8.4CI failing

Since Dec 19Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/turahe/post)[ Packagist](https://packagist.org/packages/turahe/post)[ Fund](https://wach.id/open-source/support-us)[ GitHub Sponsors](https://github.com/turahe)[ RSS](/packages/turahe-post/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (10)Used By (0)

[![Tests](https://github.com/turahe/post/actions/workflows/run-test.yml/badge.svg)](https://github.com/turahe/post/actions/workflows/run-test.yml)[![Release](https://github.com/turahe/post/actions/workflows/release.yml/badge.svg)](https://github.com/turahe/post/actions/workflows/release.yml)[![Latest Version](https://camo.githubusercontent.com/f346afc01e2f0216e7d0de3f265ea3dba47d99fb9fb61f4053ee59820845cd4e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7475726168652f706f7374)](https://github.com/turahe/post/releases)[![PHP Version](https://camo.githubusercontent.com/c0a2f4884eed71113126b9a5455bbf462b9d06f2749ea9d2d554ddcb2eaa525c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7475726168652f706f7374)](https://packagist.org/packages/turahe/post)[![Laravel Version](https://camo.githubusercontent.com/2c04d3a4cb5cadb69e34971db6df5017eebf819ad94cc68b6d6deac022e36ec6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7475726168652f706f73742f6c61726176656c2f6672616d65776f726b)](https://packagist.org/packages/turahe/post)[![Code Coverage](https://camo.githubusercontent.com/3effb77399e31a2f28bdc86407a72f9cd28a164383f5bf62d121b82132567fc1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d34362532352d79656c6c6f77)](https://github.com/turahe/post)[![License](https://camo.githubusercontent.com/2db39f7c086f9cc1e02934e699f8ce401b3782f45e87e56b7adfb98cde6eafe8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7475726168652f706f7374)](https://github.com/turahe/post/blob/master/LICENSE)[![Stars](https://camo.githubusercontent.com/f7694dc48116037dbcc2d0f72587d3936a5ccf4c53d85bf970958dfd5978a63b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7475726168652f706f7374)](https://github.com/turahe/post/stargazers)[![Forks](https://camo.githubusercontent.com/1d1920bc404f22865415be49f295db0f38237c59d3e5fe0a563cb3a04bc72260/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f7475726168652f706f7374)](https://github.com/turahe/post/network)[![Issues](https://camo.githubusercontent.com/b77583b8fec3f4a7a614fcdd3676d0e8e07ff30edaef91fcb0800b24a60906bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f7475726168652f706f7374)](https://github.com/turahe/post/issues)[![Pull Requests](https://camo.githubusercontent.com/b6ed370ddaf65845c95b476c4e4afe414602b07cdcd34cdbf7370e7567df796f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f7475726168652f706f7374)](https://github.com/turahe/post/pulls)

📝 Turahe Post
=============

[](#-turahe-post)

> **A powerful Laravel package for managing posts with rich content, markdown support, and comprehensive testing.**

[![Packagist](https://camo.githubusercontent.com/b0f0667ce6f263039bebc6f6c47e19425bbaedd2027d631ff92ce1d1a9449dbd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7475726168652f706f7374)](https://packagist.org/packages/turahe/post)[![Packagist Downloads](https://camo.githubusercontent.com/240e9ba4654089c355751741d33639828f3a2bfdcdfda3796f3b3f2d0facf12c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7475726168652f706f7374)](https://packagist.org/packages/turahe/post)[![Packagist License](https://camo.githubusercontent.com/6168c73c1bad807fcf5ca2a7c960cc1f3355ecee87ec5b1da28d16d2bc24b23e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7475726168652f706f7374)](https://packagist.org/packages/turahe/post)

🚀 Quick Start
-------------

[](#-quick-start)

```
composer require turahe/post
```

📦 Installation
--------------

[](#-installation)

### Step 1: Install Package

[](#step-1-install-package)

```
composer require turahe/post
```

### Step 2: Publish Resources

[](#step-2-publish-resources)

```
php artisan vendor:publish --provider="Turahe\Post\PostServiceProvider"
```

### Step 3: Run Migrations

[](#step-3-run-migrations)

```
php artisan migrate
```

### Step 4: Done! 🎉

[](#step-4-done-)

Your post management system is ready to use.

✨ Features
----------

[](#-features)

FeatureStatusDescription🎯 **Post Management**✅ ReadyCreate, update, and manage posts with ease📝 **Content Support**✅ ReadyRich content with markdown conversion🔗 **Slug Generation**✅ ReadyAutomatic slug generation from titles🗑️ **Soft Deletes**✅ ReadySafe deletion with data preservation👤 **User Stamps**✅ ReadyTrack who created and modified posts📊 **Sorting**✅ ReadyFlexible post ordering and sorting📢 **Publishing**✅ ReadyControl post publication status🌍 **Multi-language**✅ ReadySupport for different languages🧪 **Comprehensive Testing**✅ Ready21 tests with 79 assertions🎨 **Code Quality**✅ ReadyPSR-12 compliant with Laravel Pint🚀 Quick Start
-------------

[](#-quick-start-1)

### 📝 Basic Usage

[](#-basic-usage)

```
use Turahe\Post\Models\Post;

// Create a post
$post = Post::create([
    'title' => 'My First Post',
    'subtitle' => 'A subtitle',
    'description' => 'Post description',
    'type' => 'post',
]);

// Add content with markdown
$post->setContents('# Hello World\n\nThis is **markdown** content.');

// Get formatted content
echo $post->content; // HTML output
echo $post->content_raw; // Raw markdown
```

### 📊 Content Management

[](#-content-management)

```
// Get the latest content
$content = $post->getContent();

// Get word count and read time
echo $content->word_count; // Number of words
echo $content->read_time['text']; // "2 minutes"
```

### 📢 Publishing Posts

[](#-publishing-posts)

```
// Publish a post
$post->update(['published_at' => now()]);

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

// Get draft posts
$drafts = Post::notPublished()->get();
```

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please ensure:

### 📋 Requirements

[](#-requirements)

- ✅ **Code Quality**: Run `composer check` before submitting
- ✅ **Test Coverage**: Maintain or improve test coverage
- ✅ **Documentation**: Update documentation as needed

### 🧪 Testing Guidelines

[](#-testing-guidelines)

- Write tests for new features
- Ensure existing tests pass
- Aim for 90%+ code coverage
- Test both happy path and edge cases

### 📊 Coverage Requirements

[](#-coverage-requirements)

- **New Features**: Must have 90%+ coverage
- **Bug Fixes**: Must include regression tests
- **Refactoring**: Must maintain existing coverage levels

### 📈 Coverage Reports

[](#-coverage-reports)

For detailed coverage analysis, see:

- 📄 `COVERAGE_REPORT.md` - Comprehensive coverage analysis
- 🌐 `coverage/index.html` - Visual HTML report
- 📊 `coverage.xml` - XML data for CI/CD

🛠️ Development
--------------

[](#️-development)

### 🧪 Testing

[](#-testing)

```
# Run the test suite
composer test

# Run tests with coverage
composer test-coverage
```

### 🎨 Code Quality

[](#-code-quality)

```
# Check code style
composer pint-test

# Fix code style issues
composer pint

# Run all quality checks (code style + tests)
composer check
```

### 📊 Code Coverage

[](#-code-coverage)

```
# Run tests with coverage analysis
$env:XDEBUG_MODE="coverage"; composer test-coverage
```

**📈 Current Coverage:** 46% overall (23/50 statements)

ComponentCoverageStatusPriority✅ Post Model100%🟢 ExcellentMaintain✅ HasContents Trait92.9%🟡 Very GoodImprove❌ Content Model0%🔴 CriticalAdd Tests❌ PostServiceProvider0%🔴 CriticalAdd Tests### 📋 Requirements

[](#-requirements-1)

RequirementVersion**PHP**^8.2**Laravel**9.x, 10.x, 11.x**Database**MySQL, PostgreSQL, SQLite🔄 CI/CD
-------

[](#-cicd)

This package uses GitHub Actions for continuous integration and deployment.

### 🧪 **Continuous Integration**

[](#-continuous-integration)

FeatureDescription🧪 **Tests**Runs on PHP 8.2, 8.3, and 8.4🎨 **Code Quality**Checks code style using Laravel Pint🔒 **Security**Runs security audits on dependencies📊 **Coverage**Generates and uploads coverage reports to Codecov### 🚀 **Automatic Releases**

[](#-automatic-releases)

FeatureDescription🏷️ **Trigger**Pushes to tags (e.g., `v1.2.1`)⚡ **Process**Runs tests → Creates GitHub release → Publishes to Packagist🔑 **Requirements**Set `PACKAGIST_USERNAME` and `PACKAGIST_TOKEN` secrets### 🔄 **Automated Triggers**

[](#-automated-triggers)

- ✅ Push to `master` or `main` branches
- ✅ Pull requests to `master` or `main` branches
- ✅ **Tag pushes** (triggers automatic release)

📊 Code Coverage Status
----------------------

[](#-code-coverage-status)

ComponentCoverageStatusPriority✅ Post Model100%🟢 ExcellentMaintain✅ HasContents Trait92.9%🟡 Very GoodImprove❌ Content Model0%🔴 CriticalAdd Tests❌ PostServiceProvider0%🔴 CriticalAdd Tests**📈 Overall Coverage:** 46% (23/50 statements)

### 🎯 Coverage Goals

[](#-coverage-goals)

GoalTargetStatus**Target**90%+ overall coverage🎯 In Progress**Priority**Add tests for Content model and PostServiceProvider📋 Planned**Maintenance**Keep Post model at 100% coverage✅ Maintained📄 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

🆘 Support
---------

[](#-support)

ResourceLink🐛 **Issues**[GitHub Issues](https://github.com/turahe/post/issues)📚 **Documentation**[Coverage Report](COVERAGE_REPORT.md)🔄 **CI/CD**[GitHub Actions](https://github.com/turahe/post/actions)📦 **Packagist**[Packagist Package](https://packagist.org/packages/turahe/post)📋 Changelog
-----------

[](#-changelog)

### 🚀 v1.2.0 (Latest)

[](#-v120-latest)

FeatureDescription✨ **CI/CD Pipeline**Comprehensive GitHub Actions workflow🧪 **Multi-PHP Testing**Runs on PHP 8.2, 8.3, and 8.4🎨 **Code Quality**Laravel Pint integration🔒 **Security**Composer audit integration📊 **Coverage**Xdebug reporting with detailed analysis🔐 **Authentication**Private repository support📦 **Packagist**Custom repository support🚀 **Auto Release**Automatic Packagist publishing on tag push📈 **Reports**Detailed coverage analysis📚 **Documentation**Comprehensive guides and examples🔧 **Updates**Latest GitHub Actions versions### 📝 v1.1.0

[](#-v110)

FeatureDescription✨ **Content Management**Rich content features📝 **Markdown Support**Full markdown conversion📊 **Analytics**Word count and read time calculations### 🎉 v1.0.0

[](#-v100)

FeatureDescription🎉 **Initial Release**Basic package foundation✨ **Post Management**Core post functionality🔗 **Slug Generation**Automatic slug creation🗑️ **Soft Deletes**Safe data deletion

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance58

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~31 days

Recently: every ~4 days

Total

9

Last Release

267d ago

PHP version history (2 changes)v1.0.0PHP ^8.2

v1.3.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3513bd6100438bcb8c6b1a7e241a66e1ddaf1c11ee33883e06ef4a2784120db?d=identicon)[turahe](/maintainers/turahe)

---

Top Contributors

[![turahe](https://avatars.githubusercontent.com/u/6832622?v=4)](https://github.com/turahe "turahe (33 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/turahe-post/health.svg)

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

###  Alternatives

[metaregistrar/php-dns-client

A php-only, object-oriented client that is able to read and process DNS records

297.6k](/packages/metaregistrar-php-dns-client)

PHPackages © 2026

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