app/Http/Controllers/ClientChannelReferenceController.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()
    {
        $clientChannelReferences = DB::table('client_channels_reference')
                    ->join('clients','client_channels_reference.clientID', 'clients.clientID')
                    ->join('client_channels', 'client_channels_reference.client_channelID', 'client_channels.client_channelID')
                    ->join('statusCodes', 'client_channels_reference.status',  'statusCodes.code')
                    ->select('client_channels_reference.*', 'clients.clientName', 'client_channels.client_channel_name', 'statusCodes.description')
                    ->get();
        $statusCodes = DB::table('statusCodes')->get();
        $clientChannels = DB::table('client_channels')->get();
        $clients = DB::table('clients')->get();
        $channels = DB::table('channel')->get();
        return view('client_channel_reference.index', compact('clientChannelReferences', 'clients', 'statusCodes', 'clientChannels', 'channels'));
    }
public function index ( ) { $ clientChannelReferences = DB :: table ( 'client_channels_reference' ) -> join ( 'clients' , 'client_channels_reference.clientID' , 'clients.clientID' ) -> join ( 'client_channels' , 'client_channels_reference.client_channelID' , 'client_channels.client_channelID' ) -> join ( 'statusCodes' , 'client_channels_reference.status' , 'statusCodes.code' ) -> select ( 'client_channels_reference.*' , 'clients.clientName' , 'client_channels.client_channel_name' , 'statusCodes.description' ) -> get ( ) ; $ statusCodes = DB :: table ( 'statusCodes' ) -> get ( ) ; $ clientChannels = DB :: table ( 'client_channels' ) -> get ( ) ; $ clients = DB :: table ( 'clients' ) -> get ( ) ; $ channels = DB :: table ( 'channel' ) -> get ( ) ; return view ( 'client_channel_reference.index' , compact ( 'clientChannelReferences' , 'clients' , 'statusCodes' , 'clientChannels' , 'channels' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
// get client channels for drop down // get clients for drop down // get channels for drop down