i have a select that returns a integer value but in the variable it is stored a object that is obvious i neeed to convert to integer
$n = DB::select('select top 1 id form tags order by id DESC');
then i need to convert $n to integer
This easy to do with ORM, if you have Tag model please try,
$n = Tag::orderBy('id','desc')->first()->id;
$n = DB::select('select top 1 id form tags order by id DESC')->first();
$id = $n->id;
your id now is $id
DB::select() returns an array btw