diff --git a/.gitignore b/.gitignore index d08a5c9..439d232 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .idea .env vendor -/public/images/uploads/[^.]* \ No newline at end of file +/public/images/uploads/ \ No newline at end of file diff --git a/app/Model/Post.php b/app/Model/Post.php index 379207d..514b775 100644 --- a/app/Model/Post.php +++ b/app/Model/Post.php @@ -18,8 +18,8 @@ public function list(){ posts.created_at as criacao") ->join("categories","posts.category_id","categories.id") ->join("users","users.id","posts.user_id") - ->order("order by posts.id desc") ->busca("title,content,status") + ->order("order by posts.id desc") ->paginate(1) ->get(); } diff --git a/public/assets/images/uploads/62decb66f8ed2422573814d10ebc5b31_05042020-193218.jpg b/public/assets/images/uploads/62decb66f8ed2422573814d10ebc5b31_05042020-193218.jpg new file mode 100644 index 0000000..dbd1d56 Binary files /dev/null and b/public/assets/images/uploads/62decb66f8ed2422573814d10ebc5b31_05042020-193218.jpg differ diff --git a/public/assets/images/uploads/f308416663ef3593e7bacf5dfb8a1f0a_05042020-185910.png b/public/assets/images/uploads/f308416663ef3593e7bacf5dfb8a1f0a_05042020-185910.png deleted file mode 100644 index f13d294..0000000 Binary files a/public/assets/images/uploads/f308416663ef3593e7bacf5dfb8a1f0a_05042020-185910.png and /dev/null differ diff --git a/src/Image.php b/src/Image.php index 3560347..5cef050 100755 --- a/src/Image.php +++ b/src/Image.php @@ -24,6 +24,7 @@ class Image public function __construct($imageNameInput) { + mkdir("assets/images/uploads/",0777); $this->intervention = new ImageManager(); $this->image = $_FILES[$imageNameInput]; diff --git a/views/admin/post/edit.html b/views/admin/post/edit.html index f62e198..58df553 100644 --- a/views/admin/post/edit.html +++ b/views/admin/post/edit.html @@ -43,7 +43,7 @@