<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/



Route::group(['middleware' => ['tokencheck'],'prefix' => 'v1', 'namespace' => 'API'],function(){
Route::apiResource('/languages', 'LanguageController');

   Route::post('createComment','MainController@createComment'); 
   Route::post('contactus','MainController@contacting'); 
   
   Route::get('comment/{id}','MainController@comments'); 
   Route::get('categories','MainController@categories'); 
   Route::get('categoryNews/{id}','MainController@categoryNews'); 
   Route::get('modelNews/{id}','MainController@modelNews'); 
   Route::get('pages/{id}','MainController@pages');
   Route::get('pages','MainController@page');  
   
   Route::get('home','MainController@home'); 
   Route::get('download','MainController@download'); 
   Route::get('pdfs','MainController@pdfs'); 
   Route::get('urgent','MainController@urgent'); 
   Route::get('settings','MainController@settings'); 
   Route::get('banners','MainController@banners'); 
   Route::get('videos','MainController@videos'); 
   
   
   Route::post('search','MainController@search');
   
Route::group(['middleware' => ['ipcheck']],function(){

   Route::get('new/{id}','MainController@newsingle'); 
   Route::get('followCategories','MainController@followcategories');
   Route::get('favorites','MainController@favorites');
   Route::post('following','MainController@following');
   Route::post('favorite','MainController@favorite');
   
   
   
   
   
});

});