This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function toLatin($string) { | |
| $replace = array( | |
| "Щ" => "Sch", | |
| "щ" => "sch", | |
| "Ё" => "Yo", | |
| "Ж" => "Zh", | |
| "Х" => "Kh", | |
| "Ц" => "Ts", |