This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

pwtan14262
pwtan14262

Hi all,

I would like some help on finding is the a table exist in the database. I know of the php way of doing but i would to know the october cms way it. Thanks in advance.

pratyushpundir6424
pratyushpundir6424

You can use Eloquent to do this if you wish. Like so:

if (Schema::hasTable('your_table_name')) {
    /** Do whatever you need here */
    echo("The table exists");
}

Visit this page to read more - https://laravel.com/docs/5.1/migrations

pwtan14262
pwtan14262

Thats right! This is exactly what i wanted. Thanks pratyushpundir6424.

pratyushpundir6424
pratyushpundir6424

@pwtan14262 No worries! Glad I could help. Btw mark this as solved just for closure sake!

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.