<?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 controller to call when that URI is requested. | */ use App\Providers\RouteServiceProvider as Route; /** @noinspection PhpUndefinedMethodInspection */ Route::get('/', function () { return view('welcome'); }); /** @noinspection PhpUndefinedMethodInspection */ Route::get('/phone', function () { $phone = app()->make('brandNewIphone6'); /** @var \App\Lib\Rtyshyk\Smartphone $phone */ return view('phone', ["phoneName" => $phone->getVendor()->getName() . " " . $phone->getName(), "cpu" => $phone->getCpu()->getName(), "cores" => $phone->getCpu()->getNumOfCores(), "display" => $phone->getDisplay()->getResolutionWidth() . "X" . $phone->getDisplay()->getResolutionHeight(), "camera" => $phone->getCamera()->getMegapixels(), "battery" => $phone->getBattery()->getCapacity()]); }); /** @noinspection PhpUndefinedMethodInspection */ Route::get('/shorten', function () { $bitly = app()->make('BitlyAPI'); /** @var \Hpatoio\Bitly\Client $bitly */ /** @noinspection PhpUndefinedMethodInspection */ $response = $bitly->Shorten(['longUrl' => 'http://academy.binary-studio.com/']); return $response['url']; });
/** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. * * @param \Illuminate\Routing\Router $router * @return void */ protected function mapWebRoutes(Router $router) { $router->group(['namespace' => $this->solunesNamespace, 'middleware' => 'admin'], function ($router) { require __DIR__ . '/../Routes/routes.php'; require __DIR__ . '/../Routes/sitemap.php'; require __DIR__ . '/../Routes/artisan.php'; }); parent::mapWebRoutes($router); }
/** * Bootstrap the application services * * @param Router $router */ public function boot(Router $router) { $this->publishes([__DIR__ . '/../config/lavalang.php' => config_path('lavalang.php')], 'lavalang'); parent::boot($router); }