- Corrige l'erreur SQL 'Unknown column fk_operation in users' - L'opération active est récupérée depuis operations.chk_active = 1 - Jointure avec users pour filtrer par entité de l'admin créateur - Query: SELECT o.id FROM operations o INNER JOIN users u ON u.fk_entite = o.fk_entite WHERE u.id = ? AND o.chk_active = 1
32 lines
836 B
PHP
Executable File
32 lines
836 B
PHP
Executable File
<?php
|
|
|
|
namespace Stripe\ApiOperations;
|
|
|
|
/**
|
|
* Trait for creatable resources. Adds a `create()` static method to the class.
|
|
*
|
|
* This trait should only be applied to classes that derive from StripeObject.
|
|
*/
|
|
trait Create
|
|
{
|
|
/**
|
|
* @param null|array $params
|
|
* @param null|array|string $options
|
|
*
|
|
* @return static the created resource
|
|
*
|
|
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
|
*/
|
|
public static function create($params = null, $options = null)
|
|
{
|
|
self::_validateParams($params);
|
|
$url = static::classUrl();
|
|
|
|
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
|
|
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
|
$obj->setLastResponse($response);
|
|
|
|
return $obj;
|
|
}
|
|
}
|