You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
572 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
  4. use Illuminate\Foundation\Bus\DispatchesJobs;
  5. use Illuminate\Foundation\Validation\ValidatesRequests;
  6. use Illuminate\Routing\Controller as BaseController;
  7. class FileController extends BaseController
  8. {
  9. use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
  10. /**
  11. *
  12. * @return object
  13. *
  14. */
  15. public function index()
  16. {
  17. $files = scandir($dir);
  18. return response()->json([
  19. 'files' => $files
  20. ]);
  21. }
  22. }