I’m trying to create a google chat space via making a post request to https://chat.googleapis.com/v1/spaces with Guzzle. In response I’m getting: But if I change the body of the request and add some new invalid fields like this: I’m getting the next response: docs: https://developers.google.…
Fetch data directly from php to flutter
I’m currently working on a Flutter project with php mysql as the backend. Is there anyway that I could possibly fetch data directly from php file? I’m so clueless. For example, how do I fetch $dept from php file below and display it in a widget or store the data in Flutter: Future _saveCheckIn() T…
Laravel Modal Not Returning Data
I am not sure why I am not getting value in Laravel controller from modal. Please help me find it out. But, I am using the same code for other modal and controller. It’s working, and it’s returning values in attribute without any issue. I am using Laravel 8 with php 8.1; Below is my codes. appHttp…
Totaling the values of columns and get the average to save it on another table
I have a table work in a database that have columns score_1, score_2, score_3, and score_4. I want to get the total value and save it to database as a total_score. And from that total_score I want to get the average matching the work data with the vendor ID. How to achieve this? At the moment I have, the tota…
How to connect internal Bootsrap 5.2 with laravel 7
Hey i still learning laravel framework and i try to connect my bootstrap v.5.2 with my laravel v.7 project but it cant connect, i store css and js folder on bootsrap folder in the same level as app, config, database public, etc. and i already tried to connect it with the code: but it still cant connect? Answe…
Cannot call abstract method interface in Service-Repository pattern
In my Laravel9 project, I have many controllers that have similar functions like: TestController.php Test1Controller.php So I modified them into: TestController.php Test1Controller.php ApiController.php TestInterface.php BaseInterface.php Then I bind interfaces into services in AppServiceProvider.php, like: T…
fopen() works properly in a debug session, but doesn’t work when I call the file through the browser
I’m new to PHP and just faced the problem with creating and opening a file with fopen(). Here is my code: When I try to run the file by opening it in the browser I see the next message: ‘Cannot create a file’. But when I start debug session everithing works as it supposed to. I suspect that …
I want to add 94 at the beginning of the very number i insert
I want to add 94 at the beginning of the very number I insert from this input area. This is POS system which is written under laravel framwork. screenshot of the area Answer You should change second parameter ‘null’ to ’94’ of Form::text, it’s a default value. You can learn more …
PHP – strtr function with array not working
I am currently migrating a WordPress website to a new system I just created. I zipped the project and uploaded it to the server via WinSCP. A lot of the image filenames contain accents(e.g é) but didn’t retain the accents after unzipping. For example Nestlé-Coffee-Mate-Chocolat-Crème-425g.jpg` became N…
Laravel 9 and Livewire Validation for Unique Unless Updating
The below validation works when creating a new record, but when updating a record, partner_code and seedgens_code are getting caught in the unique validation. How do I allow a record to be updated with the same values if not changed, but still validate for unique when the value does change? Answer or where $i…