## About Redact

Small CMS with Sqlite data driven based on Laravel & Vue JS Framework, 
Spatie Multitenancy, Spatie Media-Library.

## Installation
After git pull setup .env 

```dotenv
DB_CONNECTION=sqlite
DB_DATABASE=redact_db.sqlite
```
Create database
```shell
touch ./database/redact_db.sqlite
```

and run landlord migrations
```shell
php artisan migrate --database=landlord --path=database/migrations/landlord
```

## Redact commands
**Create a tenant**
```shell
redact:create {name}
```

**Destroy a tenant**
```shell
redact:delete {id}
```

**List tenant**
```shell
redact:list
```

**Edit tenant**
```shell
redact:list
```
**Manage user**
```shell
redact:users
```

## Create landlord migration

```shell
php artisan make:migration "migration_name" --table=tenants --path=database/migrations/landlord
```


## Create Tenant Migration

```shell
php artisan make:migration migration_to_tenant_tables --table=tenant_table_name --path=database/migrations/tenant
```

## Execute Migrations on all tenant
```shell
php artisan tenants:artisan "migrate --path=database/migrations/tenant --database=tenant"
```
