database/migrations/2016_07_29_132354_create_tags_table.php
/**
     * Run the migrations.
     * It need metatags because tag`s will has own pages - looking same as news pages
     *
     * @return void
     */
Run the migrations.
It need metatags because tag`s will has own pages - looking same as news pages

@return void
Run the migrations . It need metatags because tag ` s will has own pages - looking same as news pages @return void
public function up()
    {
        Schema::create('tags', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->string('slug');
            $table->string('meta_title');
            $table->string('meta_keywords');
            $table->text('meta_description');
            $table->timestamps();
        });
        Schema::create('news_tags', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('news_id')->unsigned();
            $table->foreign('news_id')->references('id')->on('news')->onDelete('cascade');
            $table->integer('tag_id')->unsigned();
            $table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade');
            $table->timestamps();
        });
    }
public function up ( ) { Schema :: create ( 'tags' , function ( Blueprint $ table ) { $ table -> increments ( 'id' ) ; $ table -> string ( 'title' ) ; $ table -> string ( 'slug' ) ; $ table -> string ( 'meta_title' ) ; $ table -> string ( 'meta_keywords' ) ; $ table -> text ( 'meta_description' ) ; $ table -> timestamps ( ) ; } ) ; Schema :: create ( 'news_tags' , function ( Blueprint $ table ) { $ table -> increments ( 'id' ) ; $ table -> integer ( 'news_id' ) -> unsigned ( ) ; $ table -> foreign ( 'news_id' ) -> references ( 'id' ) -> on ( 'news' ) -> onDelete ( 'cascade' ) ; $ table -> integer ( 'tag_id' ) -> unsigned ( ) ; $ table -> foreign ( 'tag_id' ) -> references ( 'id' ) -> on ( 'tags' ) -> onDelete ( 'cascade' ) ; $ table -> timestamps ( ) ; } ) ; }
Run the migrations.
Run the migrations .