mercredi 4 mai 2016

Laravel5.0: passing value from a controller method to a .php file in public folder

I want to pass a value from my controller to a .php file which is inside public folder. This is my controller part

<?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class DashboardController extends Controller {

public function barChart(){

    $barChart= DB::table('clients')
        ->select('clients.ClientName','clients.Price')
        ->get();
    //want to pass this $barChart variable
}

Location of .php file is

/dist/chart/clients.php

I want to have this $barChart variable in clients.php file and perform further operation.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1WK64KM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire