/** * Run the migrations. * * @return void */ public function up() { Schema::create('systems', function (Blueprint $table) { $table->increments('id'); $table->string('site_name', 30)->default('3N1WebSite'); $table->string('site_slogan')->nullable(); $table->string('site_keywords')->nullable(); $table->string('site_description')->nullable(); $table->string('site_ipc')->nullable(); $table->text('site_analytic'); $table->string('contact_email')->nullable(); $table->softDeletes(); $table->timestamps(); }); $System = new \App\System(); $System->site_name = '3N1WebSite'; $System->site_slogan = 'Use Blog/BBS/CMS to build your website'; $System->site_keywords = '3n1website, awesome, website'; $System->site_description = 'Use Blog/BBS/CMS to build your website'; $System->site_analytic = "\n <script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', 'UA-68392745-2', 'auto');\n ga('send', 'pageview');\n </script>\n <script>\n var _hmt = _hmt || [];\n (function() {\n var hm = document.createElement('script');\n hm.src = '//hm.baidu.com/hm.js?6789357a4f28be6f0691db5576d9a479';\n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(hm, s);\n })();\n </script>\n "; $System->save(); }