buchin / db-slug
Mass slugify existing database column
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:package
Requires
- cocur/slugify: ^2.3
- gabordemooij/redbean: ^4.3
Requires (Dev)
- kahlan/kahlan: ^3.0
This package is auto-updated.
Last update: 2024-11-15 19:29:33 UTC
README
Mass slugify existing database column
Installation
composer require buchin/db-slug
Usage
<?php use Buchin\DbSlug\DbSlug; $dsn = "mysql:unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock;dbname=test"; $user = "root"; $password = "root"; $dbSlug = new DbSlug($dsn, $user, $password); // $column can be multiple $column = ['title']; $table = 'post'; $dbSlug->slug($table, $column);