HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/rentman.komma.pro/app/Komma/Tables/TableService.php
<?php

namespace Komma\Tables;

use Illuminate\Support\Collection;
use Komma\Images\ImageService;
use Komma\Tables\Models\Table;


/**
 *
 * @author      Komma <support@komma.pro>
 * @copyright   (c) 2012-2015, Komma Mediadesign
 */
class TableService
{

    /**
     * This method gets the prices with an IN
     *
     * @param $field | string, field for the in
     * @param $values | array, values for the in
     * @return mixed
     */
    public function getTableIn($field, $values)
    {
        //Only get the active blocks
        $tables = Table::where('active', '=', 1)
            //Where in with field and values
            ->whereIn($field, $values)
            //Also load the translation
            ->with('translation')
            ->get()
            ->keyBy($field);

        return $tables;
    }


    /**
     * This method gets the tables where
     *
     * @param $field | string, field for the where
     * @param $values | array, value for the where
     * @return mixed
     */
    public function getTablesWhere($field, $values)
    {
        //Only get the active blocks
        $tables = Table::where('active', '=', 1)
            //Where field is value
            ->where($field, '=', $values)
            //Also load the translation
            ->with('translation')
            ->get();

        return $tables;
    }



}