Skip to content

Instantly share code, notes, and snippets.

View MarcinGladkowski's full-sized avatar
Developing!

Marcin Gladkowski MarcinGladkowski

Developing!
View GitHub Profile

Examples, choose what you need

  • Attribute
  • Asset
  • Assert
  • Bridge
  • Builder
  • Calculator
  • Candidate
  • Cloner
<?php
/**
* Dysponujesz zestawem zadań, a każde z nich ma format:
*
* [
* 'name': string,
* 'resources': list of strings,
* 'payoff': float
* ]
/**
Użycie:
Podaj liczbę wierszy:
2
Podaj imię i nazwisko oddzielone spacją
Marcin Gladkowski
Podaj imię i nazwisko oddzielone spacją
Jan Kowalski
Wpisz szukane nazwisko:
@MarcinGladkowski
MarcinGladkowski / symfony_5_cheat_sheet.md
Last active December 16, 2021 11:16
Symfony 5 cheatsheet

Commands

Services/Autowiring

  • List services which you can use with type hinting to directly fetch them
php bin/console debug:autowiring

Example output

// application/json !== "application/json"
# Working
POST http://172.18.0.2:8080/api/auth/login
Content-Type: application/json
{
"email": "marcinemail@somepost.com",
"password": "12345"
}
const formData = {
name: 'Adam',
'billing_address_city': 'Warsaw',
'billing_address_street': 'ul. Pomorska',
'shipping_address_city': 'Krakow',
'shipping_address_street': 'ul. Karmelicka'
}
// own implementation
const mergeAddress = (data, keyParam) => {