<?php

use App\Payment;
use Illuminate\Database\Seeder;

class PaySomeInvoicesSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run() {
        foreach(Payment::inRandomOrder()->take(20)->get() as $p) {
            $p->charged = true; //paguem i es generen les factures
            $p->save();
        }
    }
}
