You must pass data to the view share() method in key value pairs.
try to dump the Channel::all(), whether it gives come data that you can access ? becoz this function might not be returning as expected.
See the logs . What do they indicate ?
nymur liked this reply
how to dump data which comes from database ? I dont know . would like to help me please from that picture file . the model is Channel
What is the Channel model about ? what does the Channel::all() method return ? simply go to web routes call a route
Route::get('/testroute', function (){ return Channel::all(); } );
if this returns error then share the image of the error. as well share the image of dump and die
Route::get('/testroute', function (){ dd(Channel::all()); } );
Also according to Larvael migrations guide . the defaultstringlength should be set to 191.
public function boot() { Schema::defaultStringLength(191); }
Laravel uses the
utf8mb4
character set by default, which includes support for storing "emojis" in the database.
i m not sure if 150
string length can support that. may be you migrations have worked well but the Channel:all()
model method is not working for that.
your uploaded image image doesn't help you should share the code of Channel model. as well as dd(Channel::all());
nymur liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community