{"action":"opened","issue":{"url":"https://api.github.com/repos/getherbert/herbert/issues/121","repository_url":"https://api.github.com/repos/getherbert/herbert","labels_url":"https://api.github.com/repos/getherbert/herbert/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/getherbert/herbert/issues/121/comments","events_url":"https://api.github.com/repos/getherbert/herbert/issues/121/events","html_url":"https://github.com/getherbert/herbert/issues/121","id":158166240,"number":121,"title":"How Do You Check if a Table Already Exists?","user":{"login":"rooseveltrp","id":4078130,"avatar_url":"https://avatars.githubusercontent.com/u/4078130?v=3","gravatar_id":"","url":"https://api.github.com/users/rooseveltrp","html_url":"https://github.com/rooseveltrp","followers_url":"https://api.github.com/users/rooseveltrp/followers","following_url":"https://api.github.com/users/rooseveltrp/following{/other_user}","gists_url":"https://api.github.com/users/rooseveltrp/gists{/gist_id}","starred_url":"https://api.github.com/users/rooseveltrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rooseveltrp/subscriptions","organizations_url":"https://api.github.com/users/rooseveltrp/orgs","repos_url":"https://api.github.com/users/rooseveltrp/repos","events_url":"https://api.github.com/users/rooseveltrp/events{/privacy}","received_events_url":"https://api.github.com/users/rooseveltrp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-02T15:14:07Z","updated_at":"2016-06-02T15:14:07Z","closed_at":null,"body":"Hi,\r\n\r\nThanks for making this framework. I am having some trouble calling the Illuminate\\Database\\Schema\\Builder::hasTable() method. Part of is my lack of familiarity with these classes.\r\n\r\nIt's resulting in a fatal error when I try to activate the plugin. All I am trying to do is, create the table if it doesn't exist :/\r\n\r\nHere's what my activate.php file look like:\r\n\r\n```\r\n<?php\r\n\r\nuse Illuminate\\Database\\Capsule\\Manager as Capsule;\r\n\r\nif (!Capsule::schema()->hasTable('sliders')) {\r\n  Capsule::schema()->create('sliders', function($table) {\r\n      $table->increments('id');\r\n      $table->string('title');\r\n  }); \r\n}\r\n\r\nif (!Capsule::schema()->hasTable('slides')) {\r\n  Capsule::schema()->create('slides', function($table) {\r\n      $table->increments('id');\r\n      $table->int('slider_id');\r\n      $table->string('image_path');\r\n      $table->string('effect');\r\n      $table->int('delay');\r\n  });\r\n}\r\n```"}}
{"actor":{"display_login":"rooseveltrp"}}