1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-15 14:42:31 +01:00
flox/backend/app/Http/routes.php

37 lines
1.1 KiB
PHP

<?php
Route::get('import', function() {
Excel::load('test.csv', function($reader) {
dd($reader->get());
$reader->each(function($sheet) {
echo $sheet['title'] . "<br>";
});
});
});
// todo: Rewrite API.
Route::group(['middleware' => ['web']], function() {
Route::group(['prefix' => 'api'], function() {
Route::get('all-categories', 'FloxController@allCategories');
Route::get('home-items/{category}/{orderBy}/{loading?}', 'FloxController@homeItems');
Route::get('category-items/{category}/{orderBy}/{loading?}', 'FloxController@categoryItems');
Route::get('more-category-items/{categoryID}/{orderBy}/{loading}/{loaded}', 'FloxController@moreCategoryItems');
Route::get('search/flox/{title}', 'FloxController@searchFloxByTitle');
Route::get('search/tmdb/{title}', 'TMDBController@searchTMDBByTitle');
Route::post('new', 'FloxController@newItem');
Route::post('handle-item-remove/{id}', 'FloxController@handleItemRemove');
});
Route::get('/{uri}', function() {
return view('app');
})->where('uri', '(.*)');
});