Skip to content

Instantly share code, notes, and snippets.

View agoyli's full-sized avatar
💭
The journey is the reward.

Agoyli agoyli

💭
The journey is the reward.
View GitHub Profile
Build a simple expense tracker application to manage your finances. The application should allow users to add, delete, and view their expenses. The application should also provide a summary of the expenses.
Requirements
Application should run from the command line and should have the following features:
Users can add an expense with a description and amount.
Users can update an expense.
Users can delete an expense.
Users can view all expenses.
$import = new \App\Imports\ProductImport();
$file = $fields->file;
$images = [];
$disk = Storage::disk('products');
if($file instanceof UploadedFile) {
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader("Xlsx");
$spreadsheet = $reader->load($file->path());
$paths = [];
foreach ($spreadsheet->getActiveSheet()->getDrawingCollection() as $k => $draw) {
if (!$draw instanceof Drawing || $draw->getPath() == "") continue;
@agoyli
agoyli / to_latin.php
Last active December 16, 2021 04:50
Convert string to Latin (from Cyrillic and Turkmen)
<?php
function toLatin($string) {
$replace = array(
"Щ" => "Sch",
"щ" => "sch",
"Ё" => "Yo",
"Ж" => "Zh",
"Х" => "Kh",
"Ц" => "Ts",