api.php 653 B

1234567891011121314151617181920
  1. <?php
  2. use App\Http\Controllers\UserController;
  3. use Illuminate\Http\Request;
  4. use Illuminate\Support\Facades\Route;
  5. /*
  6. |--------------------------------------------------------------------------
  7. | API Routes
  8. |--------------------------------------------------------------------------
  9. |
  10. | Here is where you can register API routes for your application. These
  11. | routes are loaded by the RouteServiceProvider within a group which
  12. | is assigned the "api" middleware group. Enjoy building your API!
  13. |
  14. */
  15. Route::post("api-token-auth", [UserController::class, "login"])->withoutMiddleware("auth:api");
  16. Route::get("logout",[UserController::class, "logout"]);