Skip to content

Commit

Permalink
chore: updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
frknasir committed Jul 13, 2023
1 parent d260c5a commit eb8e7a6
Showing 1 changed file with 52 additions and 10 deletions.
62 changes: 52 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# Introduction

Manage contacts(e.g customers, suppliers, vendors etc) and addresses in your laravel applications.
Manage contacts(e.g customers, suppliers, vendors etc) in your laravel applications.

## Installation

You can install the package via composer:

```bash
composer require starfolksoftware/ally
```

You can publish and run the migrations with:

```bash
php artisan vendor:publish --tag="ally-migrations"
php artisan Ally:install
php artisan migrate
```

Expand All @@ -23,11 +18,11 @@ You can publish the config file with:
php artisan vendor:publish --tag="ally-config"
```

## Configuration

This is the contents of the published config file:

```php
<?php
// config for StarfolkSoftware/Ally
return [
'middleware' => ['web'],

Expand All @@ -39,10 +34,57 @@ return [
];
```

Optionally, you can publish the views using

```bash
php artisan vendor:publish --tag="ally-views"
```

## Usage

```php
<?php

namespace App\Models;

use App\Abstracts\Model;
use Ally\HasContacts;

class Product extends Model
{
use HasContacts;
}

```

To enable team support:

```php
// this should be in a service provider
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Ally::supportsTeams();
}
```

```php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Ally\TeamHasCategories;

class Team extends JetstreamTeam
{
...
use TeamHasCategories;
}
```

## Testing
Expand All @@ -57,7 +99,7 @@ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed re

## Contributing

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.
Please see [CONTRIBUTING](https://github.com/starfolksoftware/.github/blob/main/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Expand Down

0 comments on commit eb8e7a6

Please sign in to comment.