Alright, so I have this seating system, that generates a 30x30 grid, and for each grid, there is an row in the database, but when I generate this grid on my page, I currently make 5 SQL request per element (and there is 900 elements), which we all know is not optimal.

To render it out, I do a while loop with some checks, and echo out this code:

```
<li class="seat" @if(Seat::showTitle($id) == 1) data-toggle="tooltip" data-placement="left" title="" data-original-title="{{ Seat::title($id) }}" @endif><a class="{{ Seat::getCSSClass($id) }}">@if(Seat::showTitle($id) == 1) {{ Seat::seatID($id) }} @endif</a></li>

```

And here is an example of how the Seat model works

```
<?php

class Seat extends Eloquent {

    protected $fillable=array('user_id','timestamp','temp_user_id','temp_timestamp', 'class', 'seat_id', 'seat_name');

    protected $table = 'seats';

    public static $classes =    array(
                    "blank" => array(
                        "css_class"     => "seating_blank",
                        "can_reserve"   => 0,
                        "show_title"    => 0,
                        "title"         => "Blank"
                    ),
                    "available" => array(
                        "css_class"     => "seating_green",
                        "can_reserve"   => 1,
                        "show_title"    => 1,
                        "title"         => "Ledig"
                    ),
                    "reserved" => array(
                        "css_class"     => "seating_grey",
                        "can_reserve"   => 0,
                        "show_title"    => 1,
                        "title"         => "Reserveret"
                    ),
                    "taken" => array(
                        "css_class"     => "seating_red",
                        "can_reserve"   => 0,
                        "show_title"    => 1,
                        "title"         => "Betalt og Reserveret"
                    ),
                    "temp_taken" => array(
                        "css_class"     => "seating_orange",
                        "can_reserve"   => 0,
                        "show_title"    => 1,
                        "title"         => "Reservation igangsat"
                    )

                );

    public static function getCSSClass($seat) 
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            $class = $theSeat->class;

            return Self::$classes[$class]['css_class'];
        } else {
            return NULL;
        }
    }

    public static function canReserve($seat) 
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            $class = $theSeat->class;

            return Self::$classes[$class]['can_reserve'];
        } else {
            return NULL;
        }
    }

    public static function showTitle($seat) 
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            $class = $theSeat->class;

            return Self::$classes[$class]['show_title'];
        } else {
            return NULL;
        }
    }
    public static function title($seat) 
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            $class = $theSeat->class;

            return Self::$classes[$class]['title'];
        } else {
            return NULL;
        }
    }

    public static function seatID($seat)
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            return $theSeat->seat_id;
        } else {
            return NULL;
        }
    }

    public static function seatName($seat)
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            return $theSeat->seat_name;
        } else {
            return NULL;
        }
    }

    public static function classTitle($class)
    {
        return Self::$classes[$class]["title"];
    }

    public static function userID($seat)
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            return $theSeat->user_id;
        } else {
            return NULL;
        }
    }

    public static function getClass($seat)
    {
        $theSeat = Self::where('id', '=', $seat)->first();

        if($theSeat) {
            return $theSeat->class;
        } else {
            return NULL;
        }
    }

}

```

And with 5 of these function per request, that is way to many. So I need some good way to minimize the SQL load of this system.