Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…media-secure into develop
  • Loading branch information
nasrulhazim committed Dec 3, 2023
2 parents 35a8b1f + 7641c2d commit 7c08db8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/Http/Controllers/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ class MediaController extends Controller
/**
* Handle the incoming request.
*
* @param \Illuminate\Http\Request $request
* @param string $type
* @param string $uuid
* @return \Illuminate\Http\Response
*/
public function __invoke(Request $request, string $type, string $uuid)
Expand Down
12 changes: 6 additions & 6 deletions src/LaravelMediaSecure.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public static function routes()
config('laravel-media-secure.prefix').'/{type}/{uuid}',
config('laravel-media-secure.controller')
)
->name(
config('laravel-media-secure.route_name')
)
->middleware(
config('laravel-media-secure.middleware', ['auth', 'verified'])
);
->name(
config('laravel-media-secure.route_name')
)
->middleware(
config('laravel-media-secure.middleware', ['auth', 'verified'])
);
}
}
4 changes: 0 additions & 4 deletions src/Policies/MediaPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class MediaPolicy
/**
* Determine whether the user can view the model.
*
* @param \Illuminate\Foundation\Auth\User $user
* @param \Spatie\MediaLibrary\MediaCollections\Models\Media $media
* @return \Illuminate\Auth\Access\Response|bool
*/
public function view(User $user, Media $media)
Expand All @@ -38,8 +36,6 @@ public function view(User $user, Media $media)
/**
* Determine whether the user can view the model.
*
* @param \Illuminate\Foundation\Auth\User $user
* @param \Spatie\MediaLibrary\MediaCollections\Models\Media $media
* @return \Illuminate\Auth\Access\Response|bool
*/
public function download(User $user, Media $media)
Expand Down
1 change: 1 addition & 0 deletions tests/LaravelMediaSecureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Schema;

use function Pest\Laravel\get;
use function PHPUnit\Framework\assertTrue;

Expand Down

0 comments on commit 7c08db8

Please sign in to comment.