<commit_before># bullets

---

## Installation

* Add the repositry to your composer.json file in the require section.
    > "require": {
    >     "craigzearfoss/bullets": "dev-master"
    > },

* Run composer install.
    > composer install -o

* Add the BulletsServiceProvider to app/config.php in the providers section.
    >   Craigzearfoss\Bullets\BulletsServiceProvider::class,


---

# Usage

* In your model add the BulletableTrait.
    ```php
    use Craigzearfoss\Bullets\BulletableTrait;
    
    class MyModel extends Model
    {
        use BulletableTrait;
    ```

* To get the bullets in the controller:
    > $bullets = $myModel->bullets()->get();

* To sync the bullets when storing or updating:
    ```php
    $myModel->syncBullets(isset($data['bullet_list']) ? $data['bullet_list'] : []);
    ```

* In the forms blade templates:
    ```html
    <div class="form-group">
       {!! Form::label('bullet_list', 'Bullet Points:') !!}
       {!! Form::select('bullet_list[]', $myModel->bullets()->lists('comment', 'comment')->toArray(), array_keys($myModel->bullets()->lists('comment', 'comment')->toArray()), ['id' => 'bullet_list', 'class' => 'form-control bullet_list', 'multiple']) !!}
    </div>
    ```

* To display them in a blade template:
    ```html
    @if (!empty($bullets))
        <ul>
            @foreach($bullets as $bullet)
                <li>{{ $bullet->comment }}</li>
            @endforeach
        </ul>
    @endif
    ```
<commit_msg>upodated description<commit_after># bullets

---

## Installation

* Add the repositry to your composer.json file in the require section.
    ```javascript
    "require": {
        "craigzearfoss/bullets": "dev-master"
    },
    ```

* Run composer install.
    > composer install -o

* Add the BulletsServiceProvider to app/config.php in the providers section.
    ```php
    Craigzearfoss\Bullets\BulletsServiceProvider::class,
    ```


---

# Usage

* In your model add the BulletableTrait.
    ```php
    use Craigzearfoss\Bullets\BulletableTrait;
    
    class MyModel extends Model
    {
        use BulletableTrait;
    ```

* To get the bullets in the controller:
    ```php
    $bullets = $myModel->bullets()->get();
    ```

* To sync the bullets when storing or updating:
    ```php
    $myModel->syncBullets(isset($data['bullet_list']) ? $data['bullet_list'] : []);
    ```

* In the forms blade templates:
    ```html
    <div class="form-group">
       {!! Form::label('bullet_list', 'Bullet Points:') !!}
       {!! Form::select('bullet_list[]', $myModel->bullets()->lists('comment', 'comment')->toArray(), array_keys($myModel->bullets()->lists('comment', 'comment')->toArray()), ['id' => 'bullet_list', 'class' => 'form-control bullet_list', 'multiple']) !!}
    </div>
    ```

* To display them in a blade template:
    ```html
    @if (!empty($bullets))
        <ul>
            @foreach($bullets as $bullet)
                <li>{{ $bullet->comment }}</li>
            @endforeach
        </ul>
    @endif
    ```

{'fraction_non_alphanumeric': 0.17026219714570195, 'fraction_numerical': 0.0, 'mean_word_length': 2.919375812743823, 'pattern_counts': {'":': 4, '<': 15, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '36352', 'n_tokens_mistral': 964, 'n_tokens_neox': 941, 'n_words': 228}