Example #1
0
| 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::group(['prefix' => 'hiro', 'before' => 'auth'], function () {
    Route::get('', ['as' => 'hiro.index', 'uses' => function () {
        return View::make('main.menu');
    }]);
    Route::get('{mstname}/master', ['as' => 'hiro.master', 'use' => function ($mstname) {
        $url = "http://localhost/sasaki/hiro_manager/master.php?mst=" . $mstname;
        return Redirect::to($url);
    }]);
    Route::post('getlegal', ['as' => 'hiro.getlegal', 'uses' => function () {
        $hallid = Input::only(['hallid']);
        Log::debug($hallid);
        $hall = MstHall::whereId($hallid)->first();
        Log::debug(print_r($hall, true));
        $legal = MstLegal::whereId(print_r($hall['legal'], true))->first();
        Log::debug(print_r($legal, true));
        return Response::json(['name' => $legal['name1']]);
    }]);
    // 中古機管理表
    Route::group(['prefix' => 'oldmanager'], function () {
        Route::get('{id}/edit', ['as' => 'oldmanager.edit', 'uses' => 'OldmanagerController@edit']);
        Route::post('create', ['as' => 'oldmanager.create', 'uses' => 'OldmanagerController@create']);
        Route::post('{id}/update', ['as' => 'oldmanager.update', 'uses' => 'OldmanagerController@update']);
        Route::post('{id}/delete', ['as' => 'oldmanager.delete', 'uses' => 'OldmanagerController@delete']);
        Route::get('list', ['as' => 'oldmanager.list', 'uses' => function () {
            $url = "http://192.168.1.250/hiro_manager/chuukoki/list.php";
            return Redirect::to($url);
        }]);