app/Http/Controllers/ChannelController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $channels=channel::select('channels.*','categories.categoryname')
        ->leftJoin('categories','channels.channelcategory','=','categories.id')
        ->paginate(10);
        $categories=category::all();
        return view('addchannels',compact('channels','categories'));
    }
public function index ( ) { $ channels = channel :: select ( 'channels.*' , 'categories.categoryname' ) -> leftJoin ( 'categories' , 'channels.channelcategory' , '=' , 'categories.id' ) -> paginate ( 10 ) ; $ categories = category :: all ( ) ; return view ( 'addchannels' , compact ( 'channels' , 'categories' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .