I am getting the following error when i run @comments(['model' => $id])
ErrorException
Attempt to read property "comments" on string (View: /var/www/html/resources/views/vendor/comments/components/comments.blade.php)
my route :
Route::get('/video/{creator}/{video}/{id}', [Videocontroller::class, 'viewvideo'])->middleware('App\Http\Middleware\Subscribed','auth');
my controller:
`public function viewvideo($creator, $video, $id) {
I am getting the following error when i run @comments(['model' => $id]) ErrorException Attempt to read property "comments" on string (View: /var/www/html/resources/views/vendor/comments/components/comments.blade.php)
my route :
Route::get('/video/{creator}/{video}/{id}', [Videocontroller::class, 'viewvideo'])->middleware('App\Http\Middleware\Subscribed','auth');
my controller: `public function viewvideo($creator, $video, $id) {
my view: `<?php
$title = DB::table('videos') ->where('url', '=', $creator.'/'.$video)->get();
DB::table('videos') ->where('url', '=', $creator.'/'.$video) ->increment('views', 1);
$detect = new Mobile_Detect; if( $detect->isAndroidOS() ){
@foreach($title as $t)
{{$t->title}}
Description
description; ?>`