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

dev-master 2016-11-23 15:36 UTC

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);