Skip to content

Commit 989e38b

Browse files
shadowshadow
shadow
authored and
shadow
committed
Implemented task 5.
1 parent af1562e commit 989e38b

File tree

8 files changed

+373
-5
lines changed

8 files changed

+373
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
/vendor
55

66
# Temp files
7-
/resources/files
7+
/public/images/task-5-image.jpg
8+
/resources/images
89

910
# Logs
1011
logs

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM php:7.4-fpm
2+
RUN apt-get update && apt-get install -y \
3+
libfreetype6-dev \
4+
libjpeg62-turbo-dev \
5+
libpng-dev \
6+
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
7+
&& docker-php-ext-install -j$(nproc) gd

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: vendor/bin/heroku-php-nginx -C nginx.conf public/
1+
web: vendor/bin/heroku-php-nginx -C nginx.conf public/

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"require": {
33
"ext-mbstring": "*",
4-
"ext-json": "*"
4+
"ext-json": "*",
5+
"ext-gd": "*"
56

67
},
78
"autoload": {

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ services:
1616
- php-playground
1717

1818
php:
19-
image: php:7.2-fpm
19+
build:
20+
context: .
2021
volumes:
2122
- ./:/var/www
2223
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"4":{"name":"normal name","type":"absolutely new type","price":"450"},"6":{"name":"test3","type":"3334","price":"30"}}

resources/views/tasks/task-5.php

Lines changed: 355 additions & 0 deletions
Large diffs are not rendered by default.

routes/web.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
Route::get('/tasks/4/create', view('template', ['content' => view('tasks/task-4-create')]));
1212
Route::get('/tasks/4/search', view('template', ['content' => view('tasks/task-4-search')]));
1313
Route::get('/tasks/4/save', view('template', ['content' => view('tasks/task-4-save')]));
14-
Route::get('/tasks/4/delete', view('template', ['content' => view('tasks/task-4-delete')]));
14+
Route::get('/tasks/4/delete', view('template', ['content' => view('tasks/task-4-delete')]));
15+
16+
Route::get('/tasks/5', view('template', ['content' => view('tasks/task-5')]));

0 commit comments

Comments
 (0)