You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
494 B
PHTML

2 years ago
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Http\Controllers\IGDBController;
2 years ago
class Game extends Model
{
use HasFactory;
public function fillGameDetails ($slug){
#$game_data = IGDBController::getGameDetails($slug);
$game_data = IGDBController::getPreparedGameDetails($slug);
foreach ($game_data as $key => $value) {
$this->$key = $value;
}
}
2 years ago
}