In this case, I need to get the Field Name from the table :
this is my static model
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class Act_admin extends Model
{
static function showCust(){
$query = DB::table("dummy_db.customer")->select("*")->paginate(10);
$FieldNames = Schema::getColumnListing($query);
dd($FieldNames);
// return $data;
}
}
and the result just:
[]
Thanks before.