SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | /* | |
4 | |-------------------------------------------------------------------------- | |
5 | | Application Routes | |
6 | |-------------------------------------------------------------------------- | |
7 | | | |
8 | | Here is where you can register all of the routes for an application. | |
9 | | It's a breeze. Simply tell Laravel the URIs it should respond to | |
10 | | and give it the Closure to execute when that URI is requested. | |
11 | | | |
12 | */ | |
13 | ||
14 | Route::get('users', function() | |
15 | { | |
16 | return View::make('hello'); | |
17 | }); | |
18 | ||
19 | Route::get('login', function() | |
20 | { | |
21 | $data = Input::get('logCode'); | |
22 | if ($data=='aaa'){ | |
23 | return 'true'; | |
24 | } | |
25 | return 'false'; | |
26 | }); | |
27 | ||
28 | Route::get('/', function() | |
29 | { | |
30 | Schema::create('users', function($table){ | |
31 | $table->increments('id'); | |
32 | $table->string('name', 20); | |
33 | $table->string('surname', 20); | |
34 | $table->string('email', 150); | |
35 | $table->string('userName', 15); | |
36 | $table->string('password', 256); | |
37 | $table->integer('roleId', 3); | |
38 | $table->integer('userStatusId', 3); | |
39 | $table->boolean('isPermanent', 0); | |
40 | }); | |
41 | }); | |
42 | ||
43 | Route::get('facciamo/una/prova', function(){ | |
44 | $data = array('ciao', 'antonio', 'collega'); | |
45 | return Response::json(array('name' => 'Steve', 'state' => 'CA')); | |
46 | }); |