jngwny

Experience

11,830

0 Best Reply Awards

  • Member Since 4 Months Ago
  • 117 Lessons Completed
  • 1 Favorite

14th September, 2017

jngwny left a reply on MaatWeb/Excel +Laracast "Eloquent Techniques: Dedicated Query String Filtering" • 1 week ago

using array function return all values in excel shreadhseet from export function "$sheet->fromArray($events);" (see entire controller) sort feature still works

my controller SetTwoController .txt

13th September, 2017

jngwny left a reply on MaatWeb/Excel +Laracast "Eloquent Techniques: Dedicated Query String Filtering" • 1 week ago

tried this and it did not work public function export(DataFilters $filters) { $events = SetTwo::filter($filters)->paginate(29); Excel::create('Results', function($excel) { $excel->sheet('data',function($sheet) { $sheet->loadView('traces.sortable',array('events'=>$events)); }); })->download('xls'); }

12th September, 2017

jngwny started a new conversation MaatWeb/Excel +Laracast "Eloquent Techniques: Dedicated Query String Filtering" • 1 week ago

my controller class SetTwoController extends Controller { public function index() { $events = SetTwo::paginate(15); return view('traces.trialindex',compact('events')); } // filter index public function indexsort(DataFilters $filters) { $events = SetTwo::filter($filters)->paginate(29); return view('traces.sortable',compact('events')); } // export query public function export() { Excel::create('Results', function($excel) { $excel->sheet('data',function($sheet) { $sheet->loadView('traces.sortable'); }); })->download('xls'); } }

I get these errors when exporting (2/2) ErrorException

Undefined variable: events (View: /var/www/html/graphs/resources/views/traces/sortable.blade.php)

and

(1/2) ErrorException

Undefined variable: events in 155602786d9591ddb8b17b164a6a299cecbe9277.php (line 34)

my view works ok and sorts but does not export

Download Excel xls

26th June, 2017

jngwny left a reply on QueryBuilder ----trying To Sum TxnAmt Field From PatChgs • 2 months ago

in the model use Illuminate\Database\Eloquent\Model;

public static function TotalChargesbyDr() $patchgs = PatChg::groupby->('AdmDr') ->selectraw('sum(TxnAmt) as TxnAmt,AdmDr') ->get(); Return $patchgs;

in controller use $results=PatChg::TotalChargesbyDr(); Return view('txntotals',['results'=>$results]);

31st May, 2017

jngwny left a reply on QueryBuilder ----trying To Sum TxnAmt Field From PatChgs • 3 months ago

using \EloquentModel $patchgs =PatChg::groupBy('dr')->sum('TxnAmt');

Return view('data',['patchgs'=>$patchgs]);

jngwny started a new conversation QueryBuilder ----trying To Sum TxnAmt Field From PatChgs • 3 months ago

using \EloquentModel $patchgs =PatChg::groupby('dr')->sum('TxnAmt');

Return view('data',['patchgs'=>$patchgs]);

cannot even var_dump or dd

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.