first commit

This commit is contained in:
franknstayn
2021-07-03 18:39:08 +08:00
commit 5483c9517d
1555 changed files with 417773 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use DB;
class SportsModel extends Model {
//
function selectAllSports() // display all data from database
{
$i = DB::table('sports')->get();
return $i;
}
function insertToSports($data){
$i = DB::table('sports')->insert($data);
return $i;
}
function selectSports($q){
$i = DB::table('sports')->where('URL', '=', $q)->get();
return $i;
}
function upateSportsDetails($data, $id){
$i = DB::table('sports')->where('Id', $id)->update($data);
return $i;
}
function getSportsName() // display all data from database
{
$i = DB::table('sports')->select('Id', 'SportsName')->get();
return $i;
}
}