<?php

/*
|--------------------------------------------------------------------------
| Module Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for this module.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

/*
|--------------------------------------------------------------------------
| Admin Routes
|--------------------------------------------------------------------------
|
| Admin routes for managing quotes.
|
*/

Route::group(['middleware' => ['web', 'auth', 'adminCheck'], 'prefix' => 'admin/general', 'as' => 'admin.quotes.'], function () {
    Route::get('quote-of-the-day', ['as' => 'index', 'uses' => 'App\Modules\Quotes\QuoteController@index']);
    Route::post('quote-of-the-day', ['as' => 'store', 'uses' => 'App\Modules\Quotes\QuoteController@store']);
    Route::put('quote-of-the-day/{id}', ['as' => 'update', 'uses' => 'App\Modules\Quotes\QuoteController@update']);
    Route::delete('quote-of-the-day/{id}', ['as' => 'destroy', 'uses' => 'App\Modules\Quotes\QuoteController@destroy']);
    Route::post('quote-of-the-day/fetch', ['as' => 'fetch', 'uses' => 'App\Modules\Quotes\QuoteController@fetchQuotes']);
    Route::post('quote-of-the-day/reset', ['as' => 'reset', 'uses' => 'App\Modules\Quotes\QuoteController@resetPageTracking']);
});