/**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('categories', function (Blueprint $table) {
         $table->increments('id');
         $table->string('title', 255);
         $table->string('seo_title', 255);
         $table->string('seo_keywords', 255);
         $table->string('seo_description', 512);
         $table->string('slug', 512);
         $table->timestamps();
     });
     $category = new \App\Models\Categories();
     $category->id = 1;
     $category->title = 'Uncategorized';
     $category->slug = 'uncategorized';
     $category->save();
 }
예제 #2
0
">
									<span class="card-title"><?php 
    echo $product->nombre;
    ?>
</span>
								</div>
								<div class="card-content">
									<?php 
    echo $product->descripcion;
    ?>
								</div>
								<div class="card-action">
									Categoria:
									<a href="#">
										<?php 
    $category = new \App\Models\Categories();
    $category_name = $category->find($product->id_cat);
    echo $category_name->nombre;
    ?>
									</a>
								</div>
							</div>
					</div>
				<?php 
}
?>
			</div>
		</div>
	</div>
</section>