Problem is there a more elegant way to do what the code below does without use “foreach”? I am trying […]
Tag: eloquent
Compare 2 Different database Table
Problem I have php function that compares two different database table. Any suggestion on improving it. public function comparePartyTableCandidates() { […]
Laravel – super long relation, it doesn’t feel right
Problem Okay, This is my method: public function edit(Request $request, $ent, $room, $obj) { $input = $request->except([‘_token’]); Enterprise::where(‘bedrijfsnaam’, $ent)->first()->rooms()->where(‘name’, $room)->first()->objects()->where(‘name’, […]
Laravel controller getting results based on parameter including relationship results
Problem I am trying to learn to improve my coding on a daily basis and this is one of the […]
A PHP Controller, which feels to ‘array-like’, in Laravel
Problem This is a controller, which receives the validated input from a http request, then finds the assorted model and […]
A create gateway controller in Laravel
Problem In my app users can create and soft-delete payment gateways something like Paypal. Users of a website can connect […]
PHP Laravel – Improving and refactoring code to Reduce Queries
Problem Improve Request to Reduce Queries I have a web application, where users can upload Documents or Emails, to what […]
Compare two tables and arrange the values in a new array
Problem I have t things working with this current setup: Route::get(‘test’, function(){ $finished = AppProgress::select(‘stack_id’)->get(); $unfinished = AppStack::select([‘id as stack_id’])->get(); […]