api.php 951 B

1234567891011121314151617181920212223242526
  1. <?php
  2. use Illuminate\Http\Request;
  3. use Illuminate\Support\Facades\Route;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | API Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register API routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | is assigned the "api" middleware group. Enjoy building your API!
  12. |
  13. */
  14. Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
  15. return $request->user();
  16. });
  17. Route::group(['namespace' => 'Crop'], function() {
  18. Route::get('crop/{crop}/{name}', 'CropController@search')->where('crop', '104|1111');
  19. Route::get('crop/{crop}/{encodedCustNo}/jobs', 'CropController@getJobs')->where('crop', '104|1111');
  20. });
  21. Route::group(['namespace' => 'Whois', 'prefix' => 'whois'], function () {
  22. Route::get('{domain}', 'WhoisController@search');
  23. });