app/Http/Controllers/SaleschannelController.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()
    {
        $brands=brand::all();
        $channels=channel::all();
        $saleschannels=saleschannel::select('brands.brandname','channels.channelname','saleschannels.*')
        ->leftJoin('brands','saleschannels.brand','=','brands.id')
        ->leftJoin('channels','saleschannels.channelid','=','channels.id')
        ->paginate(7);
        return view('addsaleschannel',compact('brands','channels','saleschannels'));
    }
public function index ( ) { $ brands = brand :: all ( ) ; $ channels = channel :: all ( ) ; $ saleschannels = saleschannel :: select ( 'brands.brandname' , 'channels.channelname' , 'saleschannels.*' ) -> leftJoin ( 'brands' , 'saleschannels.brand' , '=' , 'brands.id' ) -> leftJoin ( 'channels' , 'saleschannels.channelid' , '=' , 'channels.id' ) -> paginate ( 7 ) ; return view ( 'addsaleschannel' , compact ( 'brands' , 'channels' , 'saleschannels' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .