本文整理汇总了PHP中Route::GET方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::GET方法的具体用法?PHP Route::GET怎么用?PHP Route::GET使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Route
的用法示例。
在下文中一共展示了Route::GET方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
Route::get('role/create', ['uses' => 'RoleController@create']);
Route::POST('role/store', ['uses' => 'RoleController@store', 'as' => 'role.store']);
Route::get('role/edit/{id}', ['uses' => 'RoleController@edit']);
Route::PUT('role/update', ['uses' => 'RoleController@update', 'as' => 'role.update']);
Route::resource('permission', 'PermissionController');
Route::resource('user', 'UserController');
Route::resource('lokasi', 'LokasiController');
Route::get('subkelompok', ['uses' => 'SubKelompokController@index', 'as' => 'sub.index']);
Route::get('peminjaman', ['uses' => 'PeminjamanController@index', 'as' => 'peminjaman.index']);
Route::get('peminjaman/create', ['uses' => 'PeminjamanController@create', 'as' => 'peminjaman.create']);
Route::POST('peminjaman/store', ['uses' => 'PeminjamanController@store', 'as' => 'peminjaman.store']);
Route::get('peminjaman/getsubkelompok', ['uses' => 'PeminjamanController@getSubKelompok', 'as' => 'get.sub']);
Route::get('peminjaman/view/{id}', ['uses' => 'PeminjamanController@show', 'as' => 'peminjaman.view']);
Route::get('peminjaman/return/{id}', ['uses' => 'PeminjamanController@returnSub']);
Route::POST('peminjaman/addcart', ['uses' => 'PeminjamanController@addCart', 'as' => 'cart.add']);
Route::GET('peminjaman/approve/{id}', ['uses' => 'PeminjamanController@approve', 'as' => 'peminjaman.approve']);
Route::get('get_id_sub_kelompok', ['uses' => 'SubKelompokController@getSubKelompok', 'as' => 'subkelompok.getid']);
Route::get('get_data_sub_kelompok', ['uses' => 'SubKelompokController@getDataSubKelompok', 'as' => 'subkelompok.getdata']);
Route::get('api/barang', array('uses' => 'BarangController@apiBarang'));
Route::get('barang', ['uses' => 'BarangController@index']);
Route::POST('barang/store', array('uses' => 'BarangController@store'));
Route::get('api/getidBarang', array('uses' => 'BarangController@getKodeBarang'));
Route::get('suplier/create', ['uses' => 'SuplierController@create']);
Route::POST('suplier/store', ['uses' => 'SuplierController@store', 'as' => 'suplier.store']);
Route::POST('penjualan/store', ['uses' => 'PenjualanController@store', 'as' => 'penjualan.store']);
Route::get('penjualan/create', ['uses' => 'PenjualanController@create']);
Route::get('penjualan/apibarang', ['uses' => 'PenjualanController@apiBarang', 'as' => 'penjualan.data']);
Route::get('penjualan/getId', ['uses' => 'PenjualanController@getId']);
ROute::get('penjualan/cart', ['uses' => 'PenjualanController@datacart', 'as' => 'cart.data']);
Route::get('penjualan/deletecart', ['uses' => 'PenjualanController@deletecart']);
Route::POST('penjualan/editcart', ['uses' => 'PenjualanController@editcart']);
示例2: function
Route::GET('github/login', function () {
SocialAuth::login('github', function ($user, $userdetails) {
var_dump($userdetails);
$user->email = $userdetails->email;
$user->id = $userdetails->id;
$user->save();
});
return "DONE ";
});
Route::GET('google/authorize', function () {
return SocialAuth::authorize('google');
});
Route::GET('google/login', function () {
SocialAuth::login('google', function ($user, $userdetails) {
dd($userdetails);
});
return "DONE ";
});
// API Version 1.0
Route::group(['prefix' => 'api/v1', 'namespace' => 'Api\\V1'], function () {
/*Getting json bookings data*/
Route::GET('/bookings', 'ApiController@bookingsApi');
/*Getting json cars listing */
Route::GET('/cars', 'ApiController@carsApi');
/*Getting the json price listing*/
Route::GET('/price', 'ApiController@priceApi');
/*Getting Extra Data listing*/
Route::GET('/extra', 'ApiController@extraApi');
/*Posting the Data taken from the bookings form*/
Route::POST('/bookings_submit', 'ApiController@bookingSubmitApi');
});
示例3: function
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
Route::group(['middleware' => ['web']], function () {
Route::POST('login', ['middleware' => 'guest', 'uses' => 'Auth\\AuthController@login']);
Route::GET('login', ['middleware' => 'guest', 'uses' => 'Auth\\AuthController@showLoginForm']);
Route::GET('logout', 'Auth\\AuthController@logout');
Route::POST('password/email', 'Auth\\PasswordController@sendResetLinkEmail');
Route::POST('password/reset ', 'Auth\\PasswordController@reset');
Route::GET('password/reset/{token?}', 'Auth\\PasswordController@showResetForm');
Route::POST('register', 'Auth\\AuthController@register');
Route::GET('register', 'Auth\\AuthController@showRegistrationForm');
Route::get('/', 'PagesController@home');
Route::get('/home', 'PagesController@home');
Route::get('/about', 'PagesController@about');
Route::get('/contact', 'TicketsController@create');
Route::post('/contact', 'TicketsController@store');
Route::get('/tickets', ['middleware' => 'auth', 'uses' => 'TicketsController@index']);
Route::get('/ticket/{slug?}', 'TicketsController@show');
Route::get('/ticket/{slug?}/edit', 'TicketsController@edit');
Route::post('/ticket/{slug?}/edit', 'TicketsController@update');
Route::post('/ticket/{slug?}/delete', 'TicketsController@destroy');
Route::post('/comment', 'CommentsController@newComment');
Route::get('auth/{provider}', 'Auth\\AuthController@redirectToProvider');
Route::get('auth/{provider}/callback', 'Auth\\AuthController@handleProviderCallback');
Route::get('/profile', 'ProfileController@show');
Route::post('/profile', 'ProfileController@update');
示例4: function
<?php
Route::get('/', function () {
return view('auth.login');
});
Route::get('/a/b/c', function () {
return view('pages.dashboard');
});
Route::Delete('schema/delete', ['as' => 'delete', 'uses' => 'SchemaController@deleteSelectedRows']);
Route::GET('schema/update', ['uses' => 'SchemaController@updateChangesSchema']);
Route::GET('schema/hold', ['uses' => 'SchemaController@holdSchema']);
Route::GET('schema/viewtables/{schemaname}', ['uses' => 'SchemaController@viewTables']);
Route::GET('schema/deletesinglerow', ['uses' => 'SchemaController@deleteSingleSelectedRow']);
// User Routes
Route::get('/add-new-user', ['uses' => 'UserController@addNewUser']);
Route::post('/user/addnewuser', ['uses' => 'UserController@saveNewUser']);
Route::get('/user/profile/{id}', ['uses' => 'UserController@showProfile']);
Route::get('/user/delete/{id}', ['uses' => 'UserController@deleteParticularUserById']);
Route::get('/user/edit/{id}', ['uses' => 'UserController@getEditUser']);
Route::post('/user/edit', ['uses' => 'UserController@postEditUser']);
// Provide controller methods with object instead of ID
Route::model('user', 'User');
Route::model('schema', 'Schema');
Route::resource('home', 'HomeController');
Route::resource('schema', 'SchemaController');
Route::resource('user', 'UserController');
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@authenticate');
Route::get('auth/logout', 'Auth\\AuthController@doLogout');
// Registration routes...
示例5:
return Producto::join('producto_precio', 'producto.id', '=', 'producto_precio.producto_id')->join('familia', 'producto.familia_id', '=', 'familia.id')->select('producto.id', 'iva0', 'nombre', 'color', 'foto', 'piezas_paquete', 'clave', 'precio_venta', 'factor_descuento')->where('clave', $clave)->first();
});
//Admin
Route::post('pedidos/verpedidos', 'AdminController@verpedidos');
Route::get('consultas/inventario', 'AdminController@inventario');
Route::get('consultas/pedidos', 'AdminController@pedidos');
Route::get('consultas/listapedidos', 'AdminController@listapedidos');
Route::get('consultas/listaagentes', 'AdminController@listaagentes');
Route::get('consultas/listp', 'AdminController@listp');
Route::get('entradas/agregar', 'AdminController@agregar');
Route::POST('entradas/proveedores', 'AdminController@proveedores');
Route::POST('entradas/buscar', 'AdminController@buscar');
Route::POST('entradas/addproducto', 'AdminController@addproducto');
Route::POST('entradas/registrarentrada', 'AdminController@entradas');
Route::GET('consultas/verestatusadmin', 'AdminController@verestatusadmin');
Route::GET('consultas/cambiarestatusadmin', 'AdminController@cambiarestatusadmin');
Route::POST('consultas/verificarpassadmin', 'AdminController@verificarpassadmin');
//Exportar e Excel
Route::get('consultas/exportarexcel', 'AdminController@exportarexcel');
Route::get('consultas/excel', 'AdminController@excel');
Route::POST('consultas/dpedidos', 'AdminController@dpedidos');
// Ruta para la busqueda de productos
Route::post('productos/getProducto', 'ProductoController@getProducto');
//Agregar producto al carrito con sus paquetes
Route::get('productos/add/{producto}/{quantity}', 'ProductoController@add');
//Agregar productos al carrito con sus respectivos paquetes
Route::get('productos/agregarproducto/{id}/{quantity}', 'ProductoController@agregarproducto');
//Eliminar producto del carrito
Route::post('productos/delete/{producto}', 'ProductoController@delete');
//Vaciar todo el contenido de el carrito
Route::post('productos/vaciar', 'ProductoController@vaciar');
示例6: function
Route::resource('meetups', 'Backend\\Meetups\\MeetupController');
Route::resource('meetups.categories', 'Backend\\Meetups\\CategoryController');
Route::resource('meetups.reports', 'Backend\\Meetups\\ReportController');
Route::resource('projects', 'Backend\\Projects\\ProjectController');
Route::resource('projects.categories', 'Backend\\Projects\\CategoryController');
Route::resource('projects.reports', 'Backend\\Projects\\ReportController');
Route::resource('reports', 'Backend\\Reports\\ReportController');
Route::resource('reports.judges', 'Backend\\Reports\\JudgeController');
Route::resource('offers', 'Backend\\Offers\\OfferController');
Route::resource('callouts', 'Backend\\Site\\CalloutController');
Route::GET('callouts/delete/{id}', 'Backend\\Site\\CalloutController@delete');
Route::resource('bugreports', 'Backend\\Bugreports\\BugReportController');
Route::GET('callouts/delete/{id}', 'Backend\\Bugreports\\BugReportController@delete');
Route::resource('products', 'Backend\\Shop\\ArticleController');
Route::resource('orders', 'Backend\\Shop\\OrderController');
Route::GET('bugreports/delete/{id}', 'Backend\\Bugreports\\BugReportController@delete');
});
Route::group(['prefix' => 'account', 'middleware' => 'auth'], function () {
Route::get('/', 'Account\\ProfileController@index');
Route::get('profile', 'Account\\ProfileController@index');
Route::post('password', 'Account\\PasswordController@change_password');
Route::post('update', 'Account\\ProfileController@update');
Route::post('profile/update', 'Account\\ProfileController@update');
Route::resource('profile', 'Account\\ProfileController');
Route::resource('settings', 'Account\\SettingsController');
Route::resource('reports', 'Account\\ReportController');
Route::resource('offers', 'Account\\OfferController');
Route::resource('orders', 'Account\\OrderController');
});
Route::group(['prefix' => 'shop'], function () {
Route::get('/', 'Shop\\ArticleController@index');
示例7: function
| 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.
|
*/
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
Route::controllers(['password' => 'Auth\\PasswordController']);
Route::group(['middleware' => 'auth'], function () {
Route::get('/', 'QuizController@index');
Route::get('/home', 'QuizController@index');
Route::resource('Quiz', 'QuizController');
Route::resource('Question', 'QuestionController');
Route::GET('listQuiz', 'QuizController@listQuiz');
Route::POST('Quiz/start', 'QuizController@start');
Route::POST('Quiz/submit', 'QuizController@submit');
Route::POST('Quiz/{id}/update', 'QuizController@QuizUpdate');
Route::GET('ShowQuizResults', 'QuizController@showResults');
Route::resource('Users', 'UsersController');
Route::POST('Users/{id}', 'UsersController@updateUser');
Route::POST('Users/{id}/restore', 'UsersController@restore');
Route::resource('Class', 'ClassController');
Route::GET('JoinClass', 'ClassController@joinClass');
Route::POST('JoinClass', 'ClassController@joined');
Route::GET('ShowClass', 'ClassController@showClass');
Route::GET('ShowClassQuiz/{$id}', 'ClassController@showClassQuiz');
Route::GET('ShowQC/{$id}', 'ClassController@showClassQuiz');
});
示例8:
<?php
/*
|------------------------------------------------------------
|
| ProArtisan Routes.
|
|------------------------------------------------------------
*/
Route::GET('/proartisan/insert_commands', ['as' => 'proartisan.insert', 'uses' => 'ProArtisanController@InsertCommands']);
//To avoid timing out when running slow commands, we avoided to use POST.
Route::GET('/proartisan/execute_commands', ['as' => 'proartisan.exec', 'uses' => 'ProArtisanController@ExecuteCommands']);
示例9: function
// check if the user approved or denied the authorization request
if (!empty($input['approve'])) {
$code = AuthorizationServer::newAuthorizeRequest('user', $params['user_id'], $params);
Session::forget('authorize-params');
return Redirect::to(AuthorizationServer::makeRedirectWithCode($code, $params));
} else {
if (!empty($input['deny'])) {
Session::forget('authorize-params');
return Redirect::to(AuthorizationServer::makeRedirectWithError($params));
} else {
return "Error processing form";
}
}
}));
/**
* Route url with any v# to the resource controller, let IoC Dependency injection determine proper version of API to inject
*/
Route::group(array('prefix' => 'api/{v1}'), function () {
// Manually define resource routes to catch all resource end points
// Retrieve data
Route::GET('{route}', array('as' => 'api.{v1}.{route}.index', 'uses' => 'ResourceController@index'));
Route::GET('{route}/{id}', array('as' => 'api.{v1}.{route}.show', 'uses' => 'ResourceController@show'));
// Retrive Forms for Create/Update
Route::GET('{route}/create', array('as' => 'api.{v1}.{route}.create', 'uses' => 'ResourceController@create'));
Route::GET('{route}/{id}/edit', array('as' => 'api.{v1}.{route}.edit', 'uses' => 'ResourceController@edit'));
// Modify Existing Data Create/Update/Edit/Delete
Route::POST('{route}', array('as' => 'api.{v1}.{route}.store', 'uses' => 'ResourceController@store'));
Route::PUT('{route}/{id}', array('as' => 'api.{v1}.{route}.update', 'uses' => 'ResourceController@update'));
Route::PATCH('{route}/{id}', 'ResourceController@update');
Route::DELETE('{route}/{id}', array('as' => 'api.{v1}.{route}.destroy', 'uses' => 'ResourceController@destroy'));
});