diff --git a/app/controllers/Api/Web/ArtistsController.php b/app/controllers/Api/Web/ArtistsController.php index dd3e0017..3dfaee41 100644 --- a/app/controllers/Api/Web/ArtistsController.php +++ b/app/controllers/Api/Web/ArtistsController.php @@ -14,6 +14,7 @@ use Entities\Image; use Entities\Track; use Entities\User; + use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Input; use Illuminate\Support\Facades\Response; diff --git a/app/filters.php b/app/filters.php index 622380bb..0456d3a0 100644 --- a/app/filters.php +++ b/app/filters.php @@ -40,6 +40,15 @@ }); } + App::error(function($exception) { + return Response::view('errors.404', array(), 404); + }); + + App::missing(function($exception) { + return Response::view('errors.404', array(), 404); + }); + + /* |-------------------------------------------------------------------------- | Authentication Filters diff --git a/app/models/Entities/Image.php b/app/models/Entities/Image.php index 7c765612..2ffb3adc 100644 --- a/app/models/Entities/Image.php +++ b/app/models/Entities/Image.php @@ -94,6 +94,6 @@ $destination = $this->getDirectory(); if (!is_dir($destination)) - mkdir($destination, 755, true); + mkdir($destination, 777, true); } } \ No newline at end of file diff --git a/app/models/Entities/Track.php b/app/models/Entities/Track.php index 32490d1d..13a9ae3e 100644 --- a/app/models/Entities/Track.php +++ b/app/models/Entities/Track.php @@ -328,7 +328,7 @@ $destination = $this->getDirectory(); if (!is_dir($destination)) - mkdir($destination, 755); + mkdir($destination, 777); } public function hasCover() { diff --git a/app/views/errors/400.blade.php b/app/views/errors/400.blade.php new file mode 100644 index 00000000..bfc98077 --- /dev/null +++ b/app/views/errors/400.blade.php @@ -0,0 +1,12 @@ +@extends('shared._app_layout') + +@section('app_content') +
Your request was invalid.
+@endsection + +@section('app_scripts') + +@endsection \ No newline at end of file diff --git a/app/views/errors/403.blade.php b/app/views/errors/403.blade.php new file mode 100644 index 00000000..3c1d4e61 --- /dev/null +++ b/app/views/errors/403.blade.php @@ -0,0 +1,12 @@ +@extends('shared._app_layout') + +@section('app_content') +You cannot do this.
+@endsection + +@section('app_scripts') + +@endsection \ No newline at end of file diff --git a/app/views/errors/404.blade.php b/app/views/errors/404.blade.php new file mode 100644 index 00000000..05b9d0ed --- /dev/null +++ b/app/views/errors/404.blade.php @@ -0,0 +1,12 @@ +@extends('shared._app_layout') + +@section('app_content') +We could not find what you were looking for.
+@endsection + +@section('app_scripts') + +@endsection \ No newline at end of file diff --git a/app/views/errors/500.blade.php b/app/views/errors/500.blade.php new file mode 100644 index 00000000..809aac05 --- /dev/null +++ b/app/views/errors/500.blade.php @@ -0,0 +1,12 @@ +@extends('shared._app_layout') + +@section('app_content') +There was an error in the server.
+@endsection + +@section('app_scripts') + +@endsection \ No newline at end of file diff --git a/app/views/shared/_app_layout.blade.php b/app/views/shared/_app_layout.blade.php index 2e2cf9c9..1cab25e0 100644 --- a/app/views/shared/_app_layout.blade.php +++ b/app/views/shared/_app_layout.blade.php @@ -92,7 +92,6 @@ @endsection @section('scripts') -