Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5973b94247
|
@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||
class Guide extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name', 'guideArticles'
|
||||
'name', 'guide_articles'
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -17,7 +17,7 @@ class CreateGuidesTable extends Migration
|
|||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name');
|
||||
$table->longText('guideArticles');
|
||||
$table->longText('guide_articles');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
@csrf
|
||||
<label for="title">Titel på 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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue