added slug to recipe

This commit is contained in:
2023-12-25 12:39:40 +03:00
parent bd4566d078
commit fdca3f8b56
2 changed files with 54 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('recipes', function (Blueprint $table) {
$table->string('slug');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('recipes', function (Blueprint $table) {
$table->dropColumn('slug');
});
}
};