Skip to content

Commit

Permalink
Alter path upload
Browse files Browse the repository at this point in the history
  • Loading branch information
douglas-88 committed Apr 5, 2020
1 parent cd2921f commit 6a59c97
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea
.env
vendor
/public/images/uploads/[^.]*
/public/images/uploads/
2 changes: 1 addition & 1 deletion app/Model/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
1 change: 1 addition & 0 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Image

public function __construct($imageNameInput)
{
mkdir("assets/images/uploads/",0777);
$this->intervention = new ImageManager();

$this->image = $_FILES[$imageNameInput];
Expand Down
2 changes: 1 addition & 1 deletion views/admin/post/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1>Editando Post</h1>
<label for="ativo">Ativo</label>
<input type="radio" name="status" id="ativo" value="1" checked>
</div>
<button type="submit" class="btn btn-primary">Cadastrar</button>
<button type="submit" class="btn btn-primary">Alterar</button>
</div>
</div>
</form>
Expand Down

0 comments on commit 6a59c97

Please sign in to comment.