Merge remote-tracking branch 'origin/master'

This commit is contained in:
frederikpyt 2020-08-04 14:11:33 +02:00
commit 5973b94247
6 changed files with 7 additions and 7 deletions

View File

@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class Guide extends Model
{
protected $fillable = [
'name', 'guideArticles'
'name', 'guide_articles'
];
}

View File

@ -57,7 +57,7 @@ class GuideController extends Controller
//Me no sure what to store mester big smoke :)
$requestGuide = $request->validate([
"name" => "required|max:255",
"guideArticles" => "required",
"guide_articles" => "required",
]);
$guide = new Guide($requestGuide);
@ -105,7 +105,7 @@ class GuideController extends Controller
{
$data = $request->validate([
"name" => "required|max:255",
"guideArticles" => "required",
"guide_articles" => "required",
]);
$guidee = Guide::query()->where("id", "=", $guide->id)->first();

View File

@ -17,7 +17,7 @@ class CreateGuidesTable extends Migration
$table->id();
$table->timestamps();
$table->string('name');
$table->longText('guideArticles');
$table->longText('guide_articles');
});
}

View File

@ -21,7 +21,7 @@
@csrf
<label for="title">Titel guiden</label>
<input type="text" name="name" id="title" required>
<textarea name="guideArticles" id="editor"></textarea>
<textarea name="guide_articles" id="editor"></textarea>
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>

View File

@ -23,7 +23,7 @@
<label for="title">Navn</label>
<input value="{{$guide->name}}" type="text" name="name" id="title" required>
<label for="editor">Vejledning</label>
<textarea name="guideArticles" id="editor">{{$guide->guideArticles}}</textarea>
<textarea name="guide_articles" id="editor">{{$guide->guideArticles}}</textarea>
<input type="submit" class="btn btn-dark text-white" value="Rediger">
</form>

View File

@ -14,7 +14,7 @@
<h1 class="text-center sde-blue mt-0">Vejledninger</h1>
@foreach($guides as $guide)
<h2 class="text-center sde-blue mt-0">{{ $guide->name }}</h2>
{!! $guide->guideArticles !!}
{!! $guide->guide_articles !!}
<hr class="w-100">
@endforeach
</main>