Support the ongoing development of Laravel.io →
Database IOC Laravel.io
Last updated 1 year ago.
0

Is there a particular reason that you aren't using Eloquent? This seems like a good use case.

Create a table named "games" and make the schema how you wish. You can then create an Eloquent model like so:

class Game extends Eloquent {
    //by default, you don't even need anything else here
}

You are then able to do all sorts of things like finding a game by ID:

Game::find(1)->name; //returns the name of game 1

You can find more information about Eloquent here: http://laravel.com/docs/eloquent

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

davidxd33 davidxd33 Joined 29 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.