Skip to content
Snippets Groups Projects
Commit 3a762098 authored by LIENHARDT QUENTIN's avatar LIENHARDT QUENTIN :snake:
Browse files

Forgot description

parent 651bfa23
Branches
No related merge requests found
......@@ -25,6 +25,7 @@ class SubjectRequest extends FormRequest
{
return [
'name' => 'required',
'description' => 'required',
];
}
}
......@@ -10,5 +10,5 @@ class Subject extends Model
{
use HasFactory, SoftDeletes;
protected $fillable = ['name'];
protected $fillable = ['name', 'description'];
}
......@@ -19,6 +19,7 @@ class CreateSubjectsTable extends Migration
$table->timestamps();
$table->softDeletes();
$table->string('name');
$table->text('description');
});
}
......
......@@ -8,7 +8,10 @@
<form action="{{ route('subject.store') }}" method="POST">
@csrf
<input type="text" name="name" placeholder="Name" value="{{ old('name') }}">
<button type="submit">Create</button>
<br>
<textarea name="description" cols="30" rows="10" placeholder="Description">{{ old('description') }}</textarea>
<br>
<button type="submit" class="p-1 bg-green-500 text-white">Create subject!</button>
</form>
@if ($errors->any())
......
......@@ -9,4 +9,6 @@
<p>published : {{ date('d-m-Y H:i', strtotime($subject->created_at)) }}</p>
<p>{{ $subject->description }}</p>
</x-app-layout>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment