Skip to content

Instantly share code, notes, and snippets.

View aelfannir's full-sized avatar

ABDERRAHMANE ELFANNIR aelfannir

View GitHub Profile
@aelfannir
aelfannir / uc-booking-recommendations.md
Last active March 2, 2026 18:04
UC: Booking Details — Personalised Recommendations

UC: Booking Details — Personalised Recommendations

Domain: Smart Features Status: Draft

Description: When the guest opens a booking details screen, the frontend triggers a recommendation request to the AI service. The AI fetches guest data and booking history from MyMate API, enriches it with external data sources (weather, local events, etc.), and streams back personalised recommendations for the remaining stay.

Conversation Example:

Guest opens booking details for their Grand Plaza stay (3 nights left).
@aelfannir
aelfannir / FirstFunction.php
Last active August 25, 2024 18:22
LIMIT in DQL subquery
<?php
namespace App\Doctrine;
use Doctrine\ORM\Query\AST\ASTException;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\Subselect;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\QueryException;
use Doctrine\ORM\Query\SqlWalker;
@aelfannir
aelfannir / Role.php
Created March 22, 2022 15:14
User, Role, Route
<?php
declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use App\Entity\Classes\Group;
use App\Entity\Traits\HasId;
<?php
//...
class Dci
{
/**
* @Groups("dcis:read", "dcis:write", "medicaments:write")
* @ORM\ManyToMany(targetEntity=Medicament::class, inversedBy="dcis", cascade={"persist"})
*
*/
private $dci;
@aelfannir
aelfannir / 1. User.php
Last active December 22, 2020 08:10
User Role managment
<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
/**
* Class User
* @package App
*/
@aelfannir
aelfannir / ReadMe.md
Last active August 3, 2019 10:53
Example of remote Typeahead.js

Requirement

  • typeahead.js
  • Bloodhound.js
  • Handlebars.js