Monday, April 3, 2017

Laravel: Output from database

I must be missing something, since my code isn't working, but I have tried to figure it out for a while now without any luck.

I am trying to output a single coloumns content from a table, which represents all the text-bits throughout a simple website, which I want to be able to edit and update in the table, with a simple cms, which I have created.

These are my controllers

And my Model

I would like to do this in my index.blade.php

I get the error message: undefined variable: texts, I must be missing a link between something.

I am a beginner, and I'm hoping I just made a simple mistake, which I am not skilled enough to see :)

Thanks in advance!



via Camilla Holst

Advertisement