I have a file that contains certain data in Name|Address|Email|Phone format. Each line contains the data in the said format for each customer. How do I implode or str_replace to get the format below? …
Tag: php
Laravel error Declaration of AppExceptionsHandler::report(Throwable $exception) [closed]
I’m using Laravel 6 and getting the following error when deploying to a shared host running PHP 7.3: AppExceptionsHandler::report(Throwable $exception) Declaration of AppExceptionsHandler::…
How to join two tables with a pivot table using Laravel?
I have these three tables: tbl_lista_contactabilidad tbl_equipo_postventaatc users ————————- ———————– —– id id id …
Group by one column and sum another column in a Laravel collection
I’m faily new to PHP & Laravel, and i’ve been given this task: I have a collection that looks like the one below: and i have to filter each element based on the cardId parameter, add (+) the cardQuantity parameter, and then return new, distinct arrays that look like this: How does one can achi…
List categories and highlight current category archive page
I need to display buttons for all post categories. When I click on a button, it links to the archive page of that specific category. Is there a way to highlight the current category? My code <div&…
Multiple Layouts in Laravel Blade, Vue-Router [closed]
I am trying to separate user & admin functionality but can’t find a satisfactory solution. After login, the user is authenticated and then he is redirected to either user or admin blade view …
Hosted fields in braintree gives error “Cannot determine payment method” PHP Laravel
Can anyone please explain me how could i make a working Braintree payment with hosted fields, in Laravel. I tried to look at the documentation myself but i couldn’t make it working. i created the token in the controller to be sent to the view like: On the blade view i have this JS: }); Here is the metho…
Change last key (dynamically named) in a multidimensional array in PHP [closed]
If my array looks like: $array[‘foo’][‘bar’][‘this’] = ‘something’; Array ( [foo] => Array ( [bar] => Array ( [this] => something …
How should I change the database layout of my html form to make it more scalable?
I have a HTML form which sends the results to a database currently. The questions are hardcoded to the html page and I am trying to make the form more scalable, dynamic and flexible. I got suggested …
Laravel Form displaying correct data but storing incorrect values in DB
I have come across a bug on my website and I am baffled as to how to fix it.. basically I have a view to create courses, I type a course title and secondly assign an instructor to that course and …