コード例 #1
0
ファイル: Command.php プロジェクト: pastebimas/blog
 /**
  * Execute the console command.
  *
  */
 public function fire()
 {
     $this->info('            [ Welcome to ServerFireTeam Blog Installations ]       ');
     $this->call('vendor:publish');
     $this->call('migrate', array('--path' => 'vendor/serverfireteam/blog/src/database/migrations'));
     $this->call('panel:install');
     // add blog to menu
     $link = new \Serverfireteam\Panel\Link();
     $link->getAndSave('Blog', 'Blog');
     $link->save();
 }
コード例 #2
0
ファイル: CrudCommand.php プロジェクト: aoslee/panel
 /**
  * Execute the console command.
  *
  */
 public function fire()
 {
     $this->info('            [ ServerFireTeam Panel Crud Generator ]       ');
     $crudName = $this->argument('name');
     $this->call('panel:createmodel', ['name' => $crudName]);
     $this->call('panel:createcontroller', ['name' => $crudName]);
     $link = new \Serverfireteam\Panel\Link();
     $link->getAndSave($crudName, $crudName . 's');
     $link->save();
     if (!\Schema::hasTable($crudName)) {
         $this->info('    The Table Corresponding to this Model does not exist in Database!!       ');
         $this->info('                    Please Create this table         ');
     }
 }
コード例 #3
0
ファイル: LinkSeeder.php プロジェクト: aoslee/panel
 public function run()
 {
     $link = Link::where('url', '=', 'Link')->take(1)->get();
     $admin = Link::where('url', '=', 'Admin')->take(1)->get();
     if (isset($link)) {
         Link::where('url', '=', 'Link')->update(['main' => true]);
         Link::where('url', '=', 'Admin')->update(['main' => true]);
     } else {
         Serverfireteam\Panel\Link::create(array('display' => 'Links', 'url' => 'Link', 'main' => true));
         Serverfireteam\Panel\Link::create(array('display' => 'Admins', 'url' => 'Admin', 'main' => true));
     }
 }
コード例 #4
0
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('links', function ($table) {
         $table->increments('id');
         $table->string('display');
         $table->string('url');
         $table->timestamps();
         // We'll need to ensure that MySQL uses the InnoDB engine to
         // support the indexes, other engines aren't affected.
         $table->engine = 'InnoDB';
     });
     Serverfireteam\Panel\Link::create(array('display' => 'Links', 'url' => 'Link'));
 }