I have helped to port the first the three routes for you. I suggest you to read up on laravel routing at http://laravel.com/docs/routing
Route::get('/redirect/index/{any}', array('uses' => 'ControllerName@FunctionName'));
Route::get('/shorten/create', array('uses' => 'ControllerName@FunctionName'));
Route::get('/stats/view', array('uses' => 'ControllerName@FunctionName'));
This is how I would have done it.
<?php
Route::get('shorten/create', [
'as' => 'createUrl',
'uses' => 'ShortenController@getCreate'
]);
Route::get('stats/view', [
'as' => 'statsView',
'uses' => 'StatsController@getView'
]);
Route::get('/', [
'as' => 'index',
'uses' => 'ShortenController@getIndex'
]);
Route::get('{shortUrl}', [
'as' => 'url',
'uses' => 'ShortenController@getUrl'
]);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community