Skip to content

Commit

Permalink
Improve the routes
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckyCyborg committed Jul 13, 2019
1 parent 527836e commit 0eb9704
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/Routes/Assets.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

use Nova\Http\Request;
use Nova\Http\Response;


// Register the route for assets from main assets folder.
Expand All @@ -20,7 +19,7 @@
$namespace = $vendor .'/' .$package;

if (is_null($packagePath = $dispatcher->getPackagePath($namespace))) {
return new Response('File Not Found', 404);
return Response::make('File Not Found', 404);
}

$path = $packagePath .str_replace('/', DS, $path);
Expand All @@ -34,7 +33,7 @@
$paths = $dispatcher->getVendorPaths();

if (! Str::startsWith($path, $paths)) {
return new Response('File Not Found', 404);
return Response::make('File Not Found', 404);
}

$path = BASEPATH .'vendor' .DS .str_replace('/', DS, $path);
Expand Down

0 comments on commit 0eb9704

Please sign in to comment.