Category : php-7.4

I’m trying to cache a SOAP response (a class object with multiple child objects). Let’s say my response object is $responseObject and I save it to a file called /tmp/response.dat with $this->io->save(serialize($responseObject), ‘/tmp/response.dat’); (pseudo code). When trying to get that response later (in a new request) via $responseObject = unserialize($this->io->read(‘/tmp/response.dat’)); I get a __PHP_Incomplete_Class even ..

Read more

I have a validation problem regarding multiple input field to store in Database. When i submit, the errors showing ‘additional mark field is required’. I try to test dd($request) but attributes is null. How can i store in db with multiple input field ? Here is my controller public function StoreAdditionalProcuments(Request $request) { $request->validate([ ‘additional_remark’ ..

Read more

I have a series of classes for a restful web service which should run some business logic by accepting a method taken from the URI and a JSON from input, in this form: URI: https://my-ws.local/person/dosomething Payload: { "name": "John Doe", "age": 30, "customer": true, "interests": ["movies", "rumba", "soccer"] } Before running into any business logic ..

Read more

I have a custom controller and I’m trying to define an action in the controller that could be accessed by the guest users. My controller code is the following: class MyCustomController extends Controller { … /** * {@inheritdoc} */ public function behaviors() { return [ ‘verbs’ => [ ‘class’ => VerbFilter::className(), ‘actions’ => [ ‘delete’ ..

Read more

I have two traits file with the same class: app/Traits/OperationTools_OLD.php app/Traits/OperationTools.php The two files contain the same class name like the following: <?php namespace AppTraits; use CarbonCarbon; use AppHttpHelpersFoxUtils; use AppOperation; trait OperationTools { use AppTraitsCavityTools; public function getProduction(… The app does not recognize the code of the new file OperationTools.php and it looks to ..

Read more

First we took the SAML code sample references from https://github.com/onelogin/php-saml and set up the integration with our project. Before going to company SSO, we created trial account with a third party service provider one login, to test our code for Single sign on is proper. On local this worked perfectly. We deployed same on GCP ..

Read more