<?php

namespace App\Services;
use Illuminate\Support\Facades\DB;

class RandomFiliereService {

    /**
     * @return array
     */

    public static function index()
    {
        $filieres = DB::connection('tenant')->table('filieres')
        ->inRandomOrder()
        ->limit(6)
        ->get();

        return json_decode(json_encode($filieres), true);
    }

}
