web.php 663 B

123456789101112131415161718192021222324
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register web routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. use Illuminate\Support\Facades\DB;
  13. use Illuminate\Support\Facades\Route;
  14. Route::get('/{id}', function ($id) {
  15. $utm = DB::table('utms')->select(['id' , 'origin' , 'destination' ,'status' , 'hit' , 'referer'])
  16. ->where('id', $id)->get();
  17. return $utm;
  18. });