<?php

namespace App\Helpers;

// Laravel Imports
use Illuminate\Support\Facades\Log;
use Illuminate\Database\Eloquent\Model;

// Creatia Imports
use App\Helpers\Utility\RouteList;

class ControllerCommons {

    // Provides a set of selection options for a given model where specific conditions are met. Helps keep code cleaner and is a frequent use case.
    public static function modelToSelectOptions(Model $_model, $_identifier, $_label, $_where_clauses) {
        return $_model::select($_identifier, $_label)->where($_where_clauses)->get()->toArray();
    }

}

?>