Loading…

How to check column is exists or not in a table using Laravel?

if(Schema::hasColumn('admin', 'username')) ; //check whether admin table has username column
{
   // write your logic here
}

 

Suggest An Answer

No suggestions avaliable!

Latest post from Laravel Interview Questions

Ask Question