any() public static method

Register a new route responding to all verbs.
public static any ( string $uri, Closure | array | string | null $action = null ) : Illuminate\Routing\Route
$uri string
$action Closure | array | string | null
return Illuminate\Routing\Route
 public function boot()
 {
     $this->package('orlissenberg/laravel-zendserver-pushqueue');
     // 1. Need a route to marshal requests.
     \Route::any("/queue/zendserver", function () {
         /** @var ZendJobQueue $connection */
         $connection = \Queue::connection("zendjobqueue");
         $connection->marshal();
     });
     // 2. Add the connector to the Queue facade.
     \Queue::addConnector("zendserver", function () {
         return app()->make("\\Orlissenberg\\Queue\\Connectors\\ZendJobQueueConnector");
     });
     // 3. Add configuration to the app/config/queue.php
     /*
     'zendjob' => [
         'driver' => 'zendserver',
         'options' => [],
         'callback-url' => '/queue/zendserver',
     ],
     */
     // 4. Enable the test route (optional for testing only)
     /*
     \Route::get(
         "/queue/zendtest",
         function () {
             $connection = \Queue::connection("zendjobqueue");
             $connection->push("\\Orlissenberg\\Queue\\Handlers\\TestHandler@handle", ["laravel4" => "rocks"]);
     
             return "Job queued.";
         }
     );
     */
 }
Esempio n. 2
0
 public function setRoutes()
 {
     $pages = collect(\Config::get('pages'));
     foreach ($pages as $page) {
         if (!$page['uses']) {
             continue;
         }
         switch ($page['method']) {
             case 'get':
                 \Route::get($this->getUri($page), ['as' => $this->getName($page), 'uses' => $page['uses']]);
                 break;
             case 'post':
                 \Route::post($this->getUri($page), ['as' => $this->getName($page), 'uses' => $page['uses']]);
                 break;
             case 'patch':
                 \Route::patch($this->getUri($page), ['as' => $this->getName($page), 'uses' => $page['uses']]);
                 break;
             case 'delete':
                 \Route::patch($this->getUri($page), ['as' => $this->getName($page), 'uses' => $page['uses']]);
                 break;
             case 'any':
                 \Route::any($this->getUri($page), ['as' => $this->getName($page), 'uses' => $page['uses']]);
         }
     }
 }
Esempio n. 3
0
 public static function returnRoutes()
 {
     $class = __CLASS__;
     Route::group(array('prefix' => 'api'), function () use($class) {
         Route::any('debug/{method}', array('uses' => $class . '@debug'));
     });
 }
 public function setUp()
 {
     parent::setUp();
     Route::any('{anything}', function () {
     })->where('anything', '.*');
     $this->app['router']->enableFilters();
 }
Esempio n. 5
0
 /**
  * Creates a Laravel route, returning a closure which passes the raw input to AngularPHP and returns the response
  */
 protected function init()
 {
     $route = func_get_arg(0);
     $this->setErrorHandler(function (\Exception $e, Request $r) {
         \Log::error($e, $r->toArray());
     });
     $endpoint = $this;
     \Route::any($route, function () use($endpoint) {
         $path = '/' . \Request::path();
         $referrer = \Request::header('referer');
         $host = \Request::header('host');
         if (($origin = \Request::header('Origin')) && count($this->corsHosts)) {
             $this->setCorsOrigin($origin);
         }
         /**
          * If being called remotely, add the domain name to the URI
          */
         if (strlen($referrer) && parse_url($referrer, PHP_URL_HOST) != $host) {
             $uri = '//' . $host . $path;
         } else {
             $uri = $path;
         }
         $request = new Request(\Request::json()->all());
         $response = $endpoint->setUri($uri)->execute($request, \Request::getMethod());
         return \Response::make($response->content, $response->code, $response->headers)->header('Content-Type', $response->contentType);
     });
 }
Esempio n. 6
0
 public static function returnRoutes($prefix = null)
 {
     $dics_for_cache = ['projects', 'types'];
     foreach ($dics_for_cache as $dic_name) {
         ## Refresh dics cache
         #Cache::forget('dic_' . $dic_name);
         $dic_[$dic_name] = Cache::get('dic_' . $dic_name);
         if (!$dic_[$dic_name]) {
             Cache::forget('dic_' . $dic_name);
             $dic_[$dic_name] = Dic::valuesBySlug($dic_name, function ($query) {
                 $query->orderBy('lft', 'ASC');
             }, ['allfields', 'alltextfields'], true, true, true);
             #Helper::d($dic_name); Helper::ta($dic_{$dic_name}); #die;
             $dic_[$dic_name] = DicLib::loadImages($dic_[$dic_name], ['avatar', 'image', 'logo', 'photo', 'header_img']);
             #Helper::d($dic_name); Helper::ta($dic_{$dic_name}); #die;
             Cache::add('dic_' . $dic_name, $dic_[$dic_name], self::$global_cache_min);
         }
         View::share('dic_' . $dic_name, $dic_[$dic_name]);
         #Helper::d($dic_name); Helper::ta($dic_{$dic_name});
     }
     #Helper::tad($dic_{'city'});
     #die;
     Route::group(array('prefix' => '{lang}'), function () {
         Route::any('/project/{slug}', array('as' => 'app.project', 'uses' => __CLASS__ . '@appProject'));
         #Route::any('/ajax/send-message', array('as' => 'ajax.send-message', 'uses' => __CLASS__.'@postSendMessage'));
         #Route::any('/ajax/some-action', array('as' => 'ajax.some-action', 'uses' => __CLASS__.'@postSomeAction'));
     });
     Route::group(array(), function () {
         #Route::any('/ajax/send-message', array('as' => 'ajax.send-message', 'uses' => __CLASS__.'@postSendMessage'));
         #Route::any('/ajax/some-action', array('as' => 'ajax.some-action', 'uses' => __CLASS__.'@postSomeAction'));
     });
 }
Esempio n. 7
0
 /**
  * Prepare for the tests to be run.
  */
 public function prepareForTests()
 {
     // Enable your route filters, very important!
     \Route::enableFilters();
     \Route::any('{all}', 'Tdt\\Core\\BaseController@handleRequest')->where('all', '.*');
     \Mail::pretend(true);
 }
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->publishes([__DIR__ . '/../../../config' => config_path('laravalid')], 'config');
     $this->publishes([__DIR__ . '/../../../public' => public_path('laravalid')], 'public');
     $routeName = \Config::get('laravalid.route');
     // remote validations
     \Route::any($routeName . '/{rule}', '\\Bllim\\Laravalid\\RuleController@getIndex');
 }
Esempio n. 9
0
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     \Route::any('plugins', function () {
         \Plugin::activate('clients');
         echo 'hello';
         //print_r(\Plugin::activated());
     });
 }
 public static function registerRoutes()
 {
     $class = get_class();
     \Route::get('/pay/{id}/payto.do/{order_no}', ['as' => 'pay.payto', 'uses' => "{$class}@payto"]);
     \Route::get('/pay/pay_form_submit.do', ['before' => 'csrf', 'as' => 'pay.form_submit', 'uses' => "{$class}@submit"]);
     \Route::any('/pay/{id}/return.do', ['as' => 'pay.return', 'uses' => "{$class}@server_return"]);
     \Route::post('/pay/{id}/notify.do', ['as' => 'pay.notify', 'uses' => "{$class}@notify_return"]);
     \Route::get('/pay/success/{order_no}', ['as' => 'pay.success', 'uses' => "{$class}@success"]);
     \Route::get('/pay/fail/{order_no}', ['as' => 'pay.fail', 'uses' => "{$class}@fail"]);
 }
Esempio n. 11
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     // Zencoder callback uses this to tell our server that it is finished encoding a video
     \Route::any('/api/notifications/zencoder', ['uses' => 'Devise\\Media\\Encoding\\ZencoderNotificationsController@store', 'as' => 'dvs-api-notifications-zencoder']);
     $apiKey = $this->app['config']->get('devise.zencoder.api-key');
     $notifications = $this->app['config']->get('devise.zencoder.notifications');
     $encoder = new ZencoderJob($apiKey, $notifications, new FileDownloader(), new Framework());
     $this->app->instance("devise.video.encoder", $encoder);
     $this->app->instance("devise.audio.encoder", $encoder);
 }
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->publishes([__DIR__ . '/../../../config' => config_path('laravalid')], 'config');
     $this->publishes([__DIR__ . '/../../../public' => public_path('laravalid')], 'public');
     $routeName = \Config::get('laravalid.route');
     // remote validations
     \Route::any($routeName . '/{rule}', function ($rule) {
         return $this->app['laravalid']->converter()->route()->convert($rule, \Input::all());
     });
 }
Esempio n. 13
0
 public static function returnRoutes()
 {
     $class = __CLASS__;
     Route::group(array('prefix' => 'api'), function () use($class) {
         Route::get('help', array('uses' => $class . '@help'));
         Route::get('help/{method}', array('uses' => $class . '@helpMethod'));
         Route::any('register', array('uses' => $class . '@register'));
         Route::any('questions', array('uses' => $class . '@getQuestions'));
         Route::any('finish', array('uses' => $class . '@setRightAnswers'));
     });
 }
 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->publishes([__DIR__ . '/../../config/config.php' => config_path('laravalid.php')], 'config');
     $this->publishes([__DIR__ . '/../../public' => public_path('laravalid')], 'public');
     // remote validations
     $routeName = \Config::get('laravalid.route');
     $routeAction = \Config::get('laravalid.action', function ($rule) {
         $this->app['laravalid']->remoteValidation($rule);
     });
     \Route::any($routeName . '/{rule}', $routeAction);
 }
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     Route::group(array('prefix' => 'kcaptcha'), function () use($class) {
         Route::any('form.html', array('as' => 'kcaptcha_form', 'uses' => __CLASS__ . '@getKcaptchaForm'));
         Route::any('image.png', array('as' => 'kcaptcha_image', 'uses' => __CLASS__ . '@getKcaptchaImage'));
         Route::post('check.json', array('as' => 'kcaptcha_check', 'uses' => __CLASS__ . '@checkKcaptchaImage'));
     });
     Route::group(array('prefix' => 'captcha'), function () use($class) {
         Route::any('form.html', array('as' => 'captcha_form', 'uses' => __CLASS__ . '@getCaptchaForm'));
         Route::any('image.png', array('as' => 'captcha_image', 'uses' => __CLASS__ . '@getCaptchaImage'));
         Route::post('check.json', array('as' => 'captcha_check', 'uses' => __CLASS__ . '@checkCaptchaImage'));
     });
 }
Esempio n. 16
0
 private function routes()
 {
     Route::group(['prefix' => 'api/v1/customer'], function () {
         Route::any('', CustomerController::class . '@show');
         Route::post('signup/sms/repeat', SignupController::class . '@repeatSms');
         Route::post('signup/register', SignupController::class . '@register');
         Route::post('signup/login', SignupController::class . '@login');
         Route::post('signup/reset', SignupController::class . '@reset');
         Route::post('signup/logout', SignupController::class . '@logout');
         Route::get('signup/promo', SignupController::class . '@promo');
         Route::post('request', OrderController::class . '@request');
         Route::get('request/form', OrderController::class . '@form');
         Route::post('order/message', SignupController::class . '@orderMessage');
     });
 }
Esempio n. 17
0
 private function routes()
 {
     Route::group(['prefix' => 'gateway'], function () {
         Route::any('cloud/check', PaymentCloudController::class . '@check');
         Route::any('cloud/pay', PaymentCloudController::class . '@pay');
         Route::any('cloud/fail', PaymentCloudController::class . '@fail');
         Route::any('cloud/refund', PaymentCloudController::class . '@refund');
         Route::get('cloud/waiting/{id}', PaymentCloudController::class . '@waiting');
         Route::get('cloud/export', PaymentCloudController::class . '@export');
     });
     Route::group(['prefix' => 'payment/ya'], function () {
         Route::any('check', PaymentYamController::class . '@check');
         Route::any('aviso', PaymentYamController::class . '@pay');
         Route::any('fail', PaymentYamController::class . '@fail');
     });
 }
Esempio n. 18
0
 public function boot()
 {
     $this->loadViewsFrom(__DIR__ . '/views', 'hello');
     $this->loadTranslationsFrom(__DIR__ . '/translations', 'hello');
     //$this->loadControllerFrom(__DIR__.'/views', 'hello');
     //$this->loadViewsFrom(__DIR__.'/views', 'hello');
     $this->publishes([__DIR__ . '/views' => base_path('resources/views/vendor/hello'), __DIR__ . '/config/hello.php' => config_path('hello.php')]);
     //assets
     $this->publishes([__DIR__ . '/assets' => public_path('vendor/hello')], 'public');
     // Publish a config file
     $this->publishes([__DIR__ . '/config/hello.php' => config_path('hello.php')], 'config');
     // Publish your migrations
     $this->publishes([__DIR__ . 'database/migrations/' => database_path('/migrations')], 'migrations');
     \Route::any('/hello', function () {
         print_r(\App\User::all());
         //return view('hello::hello');
     });
 }
Esempio n. 19
0
 public function reRoute()
 {
     \Route::any('r{id}', function ($id) {
         $record = \DB::table('urlshortner')->where('short_url', trim($id))->first();
         if ($record === null) {
             echo 'URL not found!';
             exit;
         } else {
             $timeDiff = time() - strtotime($record->created_at);
             if ($timeDiff < 3600 && $record->expired == 0) {
                 return \Redirect::away($record->actual_url);
             } else {
                 \DB::table('urlshortner')->where('short_url', $record->short_url)->update(array('expired' => 1));
                 echo 'URL expired! or does not exist!';
                 exit;
             }
         }
     })->where('id', '[A-Za-z0-9]+');
 }
Esempio n. 20
0
 static function register($root = '', $paths = null)
 {
     isset($paths) and static::paths($paths);
     foreach (static::$paths as $key => &$path) {
         $self = get_called_class();
         $path = array('root' => $root . $path['url'], 'callback' => function ($page = null) use($self, $key) {
             $request = strtok(array_get($_SERVER, 'REQUEST_URI'), '?');
             if ("{$page}" !== '' and substr($request, -1) === '/') {
                 // forces check for directory index in serve().
                 $page .= '/';
             }
             return $self::serve_by($key, $page);
         }) + $path;
         Route::get($path['root'], $path);
         if (empty($path['single'])) {
             Route::any($path['root'] . '/(:all)', $path);
         }
     }
 }
 public static function returnRoutes($prefix = null)
 {
     $class = __CLASS__;
     $entity = self::$entity;
     Route::any('/ajax/check-dicval-slug-unique', array('as' => 'dicval.check-dicval-slug-unique', 'uses' => $class . "@postAjaxCheckDicvalSlugUnique"));
     Route::group(array('before' => 'auth', 'prefix' => $prefix . "/" . $class::$group), function () use($class, $entity) {
         Route::post($entity . '/ajax-order-save', array('as' => 'dicval.order', 'uses' => $class . "@postAjaxOrderSave"));
         Route::post($entity . '/ajax-nested-set-model', array('as' => 'dicval.nestedsetmodel', 'uses' => $class . "@postAjaxNestedSetModel"));
         Route::get($entity . '/{dic_slug}/{entity_id}/restore', array('as' => 'dicval.restore', 'uses' => $class . '@restore'));
         Route::resource('dic.val', $class, array('except' => array('show'), 'names' => array('index' => 'dicval.index', 'create' => 'dicval.create', 'store' => 'dicval.store', 'edit' => 'dicval.edit', 'update' => 'dicval.update', 'destroy' => 'dicval.destroy')));
     });
     Route::group(array('before' => 'auth', 'prefix' => $prefix), function () use($class, $entity) {
         Route::resource('/entity/{dic_slug}/', $class, array('except' => array('show', 'edit', 'update', 'destroy'), 'names' => array('index' => 'entity.index', 'create' => 'entity.create', 'store' => 'entity.store')));
         Route::get('/entity/{dic_slug}/{entity_id}/edit', array('as' => 'entity.edit', 'uses' => $class . '@edit'));
         Route::put('/entity/{dic_slug}/{entity_id}/update', array('as' => 'entity.update', 'uses' => $class . '@update'));
         Route::delete('/entity/{dic_slug}/{entity_id}', array('as' => 'entity.destroy', 'uses' => $class . '@destroy'));
         Route::get('/entity/{dic_slug}/{entity_id}/restore', array('as' => 'entity.restore', 'uses' => $class . '@restore'));
     });
 }
 /**
  * {@inheritDoc}
  */
 public function boot()
 {
     $this->package('payum/payum-laravel-package');
     \View::addNamespace('payum/payum', __DIR__ . '/../../views');
     $this->app->error(function (ReplyInterface $reply) {
         $response = null;
         if ($reply instanceof SymfonyHttpResponse) {
             $response = $reply->getResponse();
         } elseif ($reply instanceof HttpResponse) {
             $response = new Response($reply->getContent());
         } elseif ($reply instanceof HttpRedirect) {
             $response = new RedirectResponse($reply->getUrl());
         }
         if ($response) {
             return $response;
         }
         $ro = new \ReflectionObject($reply);
         throw new LogicException(sprintf('Cannot convert reply %s to Laravel response.', $ro->getShortName()), null, $reply);
     });
     \Route::any('/payment/authorize/{payum_token}', array('as' => 'payum_authorize_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\AuthorizeController@doAction'));
     \Route::any('/payment/capture/{payum_token}', array('as' => 'payum_capture_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\CaptureController@doAction'));
     \Route::any('/payment/refund/{payum_token}', array('as' => 'payum_refund_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\RefundController@doAction'));
     \Route::get('/payment/notify/{payum_token}', array('as' => 'payum_notify_do', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doAction'));
     \Route::get('/payment/notify/unsafe/{payment_name}', array('as' => 'payum_notify_do_unsafe', 'uses' => 'Payum\\LaravelPackage\\Controller\\NotifyController@doUnsafeAction'));
     $this->app['payum'] = $this->app->share(function ($app) {
         //TODO add exceptions if invalid payments and storages options set.
         $payum = new ContainerAwareRegistry(\Config::get('payum-laravel-package::payments'), \Config::get('payum-laravel-package::storages'));
         $payum->setContainer($app);
         return $payum;
     });
     $this->app['payum.security.token_storage'] = $this->app->share(function ($app) {
         //TODO add exceptions if invalid payments and storages options set.
         $tokenStorage = \Config::get('payum-laravel-package::token_storage');
         return is_object($tokenStorage) ? $tokenStorage : $app[$tokenStorage];
     });
     $this->app['payum.security.token_factory'] = $this->app->share(function ($app) {
         return new TokenFactory($app['payum.security.token_storage'], $app['payum'], 'payum_capture_do', 'payum_notify_do', 'payum_authorize_do', 'payum_refund_do');
     });
     $this->app['payum.security.http_request_verifier'] = $this->app->share(function ($app) {
         return new HttpRequestVerifier($app['payum.security.token_storage']);
     });
 }
Esempio n. 23
0
 private function registerCommands()
 {
     Route::group(['prefix' => 'man', 'before' => 'manage.auth.basic'], function () {
         Route::any('content/blocks', ContentBlockController::class . '@index');
         Route::post('content/blocks/store', ContentBlockController::class . '@store');
         Route::post('content/blocks/{id}', ContentBlockController::class . '@update');
         Route::delete('content/blocks/{id}', ContentBlockController::class . '@delete');
         Route::any('service/titles', ServiceTitleController::class . '@index');
         Route::post('service/titles/{id}', ServiceTitleController::class . '@update');
         Route::get('requests', OrderRequestController::class . '@index');
         Route::any('reporter', ReportController::class . '@index');
         Route::any('reporter/invite/stat', ReportController::class . '@inviteStat');
         Route::any('reporter/reviews', ReportController::class . '@orderReviews');
         Route::any('autopays', AutoPayController::class . '@index');
         Route::any('autopays/orders/{cid}', AutoPayController::class . '@orders');
         Route::any('autopays/start/{order_id}/{customer_id}', AutoPayController::class . '@start');
         Route::any('autopays/check_customers_orders/{customer_id}', AutoPayController::class . '@checkCustomersOrders');
         Route::any('autopays/autopay_all', AutoPayController::class . '@autopayAll');
     });
 }
<?php

/*
 |--------------------------------------------------------------------------
 | Application Routes
 |--------------------------------------------------------------------------
 |
 | Here is where you can register all of the routes for an application.
 | 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.
 |
*/
Route::any('/', 'HomeController@index');
Route::group(['middleware' => ['web']], function () {
    Route::get('/api/directions/{from_city}/{to_city}', 'APIController@getDirections');
    Route::get('/api/getcities', 'APIController@getCities');
    //Route::post('/api/directions', 'APIController@getDirections');
    //Route::any('api/directions', 'APIController@getDirections');
    Route::post('getdata', 'HomeController@getData');
    Route::post('showresponce', 'HomeController@showResponceData');
    Route::post('getcities', 'HomeController@getCitiesData');
    Route::resource('users', 'UsersController');
    Route::resource('cities', 'CitiesController');
    Route::resource('tickets', 'TicketsController');
    Route::resource('/api', 'APIController');
    Route::resource('/home', 'HomeController');
});
Event::listen('illuminate.query', function () {
    /* print_r("<pre>");
       debug_print_backtrace();
       print_r("</pre>"); */
Esempio n. 25
0
<?php

Route::group(array('prefix' => config('jarboe.admin.uri'), 'before' => array('auth_admin', 'check_permissions')), function () {
    Route::any('logs', 'Jarboe\\Component\\Logs\\Http\\Controllers\\AdminController@logs');
});
Esempio n. 26
0
Route::get('/requeststorep', 'RequestController@storep');
Route::post('/requeststorep', 'RequestController@storep');
Route::get('/requestcreatesec', 'RequestController@createsec');
Route::get('/requeststoresec', 'RequestController@storesec');
Route::post('/requeststoresec', 'RequestController@storesec');
// Import Po
Route::get('/import', 'importController@index');
Route::get('/importresult', 'importController@show');
Route::post('/import', 'importController@postImportPo');
Route::post('/import2', 'importController@postImportUser');
Route::post('/import3', 'importController@postImportRoll');
Route::post('/import4', 'importController@postImportUserRole');
// Import Modules
Route::get('/importmodules', 'importModulesController@index');
Route::post('/importmodulesimport', 'importModulesController@create');
Route::any('getpodata', function () {
    $term = Input::get('term');
    $data = DB::connection('sqlsrv')->table('pos')->distinct()->select('po')->where('po', 'LIKE', $term . '%')->where('closed_po', '=', 'Open')->groupBy('po')->take(10)->get();
    foreach ($data as $v) {
        $retun_array[] = array('value' => $v->po);
    }
    return Response::json($retun_array);
});
Route::any('getmoduledata', function () {
    $term = Input::get('term');
    $data = DB::connection('sqlsrv')->table('modules')->distinct()->select('module')->where('module', 'LIKE', $term . '%')->groupBy('module')->take(15)->get();
    foreach ($data as $v) {
        $retun_array[] = array('value' => $v->module);
    }
    return Response::json($retun_array);
});
Esempio n. 27
0
Route::any('provincias/(:num)', array('as' => 'provincia', 'uses' => 'api.provincias@provincia'));
// Comunas
Route::any('comunas', array('as' => 'comunas', 'uses' => 'api.comunas@comunas'));
Route::any('comunas/(:num)', array('as' => 'comuna', 'uses' => 'api.comunas@comuna'));
// Provincias por Región
Route::any('regiones/(:num)/provincias', array('as' => 'region_provincias', 'uses' => 'api.provincias@region_provincias'));
Route::any('regiones/(:num)/provincias/(:num)', array('as' => 'region_provincia', 'uses' => 'api.provincias@region_provincia'));
// Comunas por Región
Route::any('regiones/(:num)/comunas', array('as' => 'region_comunas', 'uses' => 'api.comunas@region_comunas'));
Route::any('regiones/(:num)/comunas/(:num)', array('as' => 'region_comuna', 'uses' => 'api.comunas@region_comuna'));
//Comunas por Provincia
Route::any('provincias/(:num)/comunas', array('as' => 'provincia_comunas', 'uses' => 'api.comunas@provincia_comunas'));
Route::any('provincias/(:num)/comunas/(:num)', array('as' => 'provincia_comuna', 'uses' => 'api.comunas@provincia_comuna'));
// Comunas por Provincias por Región
Route::any('regiones/(:num)/provincias/(:num)/comunas', array('as' => 'region_provincia_comunas', 'uses' => 'api.comunas@region_provincia_comunas'));
Route::any('regiones/(:num)/provincias/(:num)/comunas/(:num)', array('as' => 'region_provincia_comuna', 'uses' => 'api.comunas@region_provincia_comuna'));
/*
|--------------------------------------------------------------------------
| Application 404 & 500 Error Handlers
|--------------------------------------------------------------------------
|
| To centralize and simplify 404 handling, Laravel uses an awesome event
| system to retrieve the response. Feel free to modify this function to
| your tastes and the needs of your application.
|
| Similarly, we use an event to handle the display of 500 level errors
| within the application. These errors are fired when there is an
| uncaught exception thrown in the application.
|
*/
Event::listen('404', function () {
Esempio n. 28
0
    Route::get('/tool/user-manager', array('before' => 'hasPermissions:' . $prefixSlug . '-edit', 'as' => $prefixName . 'UserManager', 'uses' => $prefixName . 'Controller@userManager'));
    Route::get('/tool/list-publisher', array('before' => 'hasPermissions:' . $prefixSlug . '-read', 'as' => $prefixName . 'ShowListPublisher', 'uses' => $prefixName . 'Controller@showListPublisher'));
    Route::post('/tool/get-list-publisher', array('as' => $prefixName . 'GetListPublisher', 'uses' => $prefixName . 'Controller@getListPublisherManager'));
    Route::get('/tool/user-edit/{idu}', array('as' => $prefixName . 'ShowUpdate', 'uses' => $prefixName . 'Controller@myProfile'));
    Route::post('/tool/user-edit/{idu}', array('as' => $prefixName . 'ShowUpdate', 'uses' => $prefixName . 'Controller@myProfile'));
    Route::post('/tool/sort-flight-running', array('before' => 'hasPermissions:' . $prefixSlug . '-edit', 'as' => $prefixName . 'SortFlightRunning', 'uses' => $prefixName . 'Controller@sortFlightRunning'));
    Route::post('/tool/update-sort-flight-running', array('before' => 'hasPermissions:' . $prefixSlug . '-edit', 'as' => $prefixName . 'UpdateSortFlightRunning', 'uses' => $prefixName . 'Controller@postSortFlightRunning'));
    Route::post('/tool/preview', array('as' => $prefixName . 'Preview', 'uses' => $prefixName . 'Controller@preview'));
    Route::get('/tool/dashboard', array('as' => $prefixName . 'Preview', 'uses' => $prefixName . 'Controller@getDashboard'));
    Route::post('/tool/dashboard/campaign', array('as' => $prefixName . 'PreviewCampaign', 'uses' => $prefixName . 'Controller@getDashboardCampaign'));
    Route::post('/tool/dashboard/flightwebsite', array('as' => $prefixName . 'PreviewFlightWebsite', 'uses' => $prefixName . 'Controller@getDashboardFilghtWebsite'));
    Route::get('/tool/create-new-url-track', array('as' => $prefixName . 'CreateNew', 'uses' => $prefixName . 'Controller@createNewTrackURL'));
    Route::post('/tool/create-new-url-track', array('as' => $prefixName . 'CreateNew', 'uses' => $prefixName . 'Controller@createNewTrackURl'));
    Route::get('/tool/url-track-ga', array('as' => $prefixName . 'URLTrackGA', 'uses' => $prefixName . 'Controller@getUrlTrackGA'));
    Route::get('/tool/edit-url-track/{id}', array('as' => $prefixName . 'Edit', 'uses' => $prefixName . 'Controller@editTrackURL'));
    Route::post('/tool/edit-url-track/{id}', array('as' => $prefixName . 'Edit', 'uses' => $prefixName . 'Controller@editTrackURL'));
    Route::get('/tool/detail-url-track/{id}', array('as' => $prefixName . 'DetailUrlTrack', 'uses' => $prefixName . 'Controller@detailTrackURL'));
    Route::post('/tool/delete-url-track', array('as' => $prefixName . 'Delete', 'uses' => $prefixName . 'Controller@deleteTrackURL'));
    //Report ad request
    Route::get('/tool/report-adrequest', array('as' => $prefixName . 'ReportAdRequest', 'uses' => $prefixName . 'Controller@getReportAdRequest'));
    Route::post('/tool/show-report-adrequest', array('as' => $prefixName . 'ShowReportAdRequest', 'uses' => $prefixName . 'Controller@showReportAdRequest'));
    Route::post('/tool/report-adrequest-hour', array('as' => $prefixName . 'ReportAdRequestHour', 'uses' => $prefixName . 'Controller@reportAdRequestHour'));
    Route::post('/tool/get-adzone', array('as' => $prefixName . 'GetAdZone', 'uses' => $prefixName . 'Controller@getAdZone'));
    /*
     * Added by Phan Minh Hoàng
     */
    Route::get('/tool/stats', array('as' => $prefixName . 'stats', 'uses' => $prefixName . 'Controller@stats'));
    Route::any('/tool/hq-get-flights', array('as' => $prefixName . 'GetFlights', 'uses' => $prefixName . 'Controller@getFlights'));
    Route::any('/tool/hq-get-websites', array('as' => $prefixName . 'GetWebsites', 'uses' => $prefixName . 'Controller@getWebsites'));
    Route::any('/tool/hq-show-stats', array('as' => $prefixName . 'ShowStats', 'uses' => $prefixName . 'Controller@showStats'));
});
Esempio n. 29
0
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
/*
#Laravel 5.1 默认路由
Route::get('/', function () {
    return view('welcome');
});
*/
//added some test routes
#对后台开启csrf过滤
Route::when('admin/*', 'csrf', ['post', 'delete', 'put']);
Route::any('cp', function () {
    return Response::view('cp');
});
/*
|--------------------------------------------------------------------------
| 基础权限 登录注册找回密码等操作
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'auth'], function () {
    $Authority = 'AuthorityController@';
    # 退出
    Route::get('logout', ['as' => 'logout', 'uses' => $Authority . 'getLogout']);
    # 登录
    Route::get('login', ['as' => 'login', 'uses' => $Authority . 'getLogin']);
    Route::post('login', $Authority . 'postLogin');
});
/*
Esempio n. 30
0
<?php

Route::group(['prefix' => 'companies', 'namespace' => 'Modules\\Companies\\Http\\Controllers', 'middleware' => 'auth'], function () {
    Route::get('/', 'CompaniesController@index');
    Route::any('edit', 'CompaniesController@edit');
    Route::get('audit/{id}', 'CompaniesController@audit');
});