Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
- Fix images/try clean-up
- Fix Try Method
  • Loading branch information
stefanzweifel committed Jul 21, 2015
1 parent 98324fd commit 93561d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/Console/Commands/RemoveImagesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Console\Command;
use Carbon\Carbon;
use File;
use Storage;
use Screeenly\ApiLog;

class RemoveImagesCommand extends Command
Expand Down Expand Up @@ -51,6 +52,7 @@ public function handle()
$this->info('Removed '.count($logs).' Images.');

// Removed images from try service
File::cleanDirectory(public_path("images/try/"));
$files = Storage::allFiles("images/try");
Storage::delete($files);
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function createTestScreenshot(Request $request)
$proof = trim(strtolower($request->get('proof')));

if ($proof != 'laravel') {
return redirect()->route('home.landingpage');
return back()->withMessage("Wrong answer. Hint: Laravel.");
}

$url = $request->get('url');
Expand Down
2 changes: 1 addition & 1 deletion app/Screenshot/Screenshot.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function setStoragePath($filename)
{
$this->assetPath = asset($this->path.$filename);

$storagePath = public_path().'/'.$this->path;
$storagePath = public_path($this->path);

$this->createDirectory($storagePath);

Expand Down

0 comments on commit 93561d0

Please sign in to comment.