mirror of
https://github.com/mivodev/mivo.git
synced 2026-01-26 13:31:56 +07:00
chore: bump version to v1.2.3 - Fix CORS & Update Notification
This commit is contained in:
@@ -27,6 +27,34 @@ class Router {
|
||||
return $this->addRoute('POST', $path, $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a OPTIONS route (Crucial for CORS Preflight)
|
||||
*/
|
||||
public function options($path, $callback) {
|
||||
return $this->addRoute('OPTIONS', $path, $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a PUT route
|
||||
*/
|
||||
public function put($path, $callback) {
|
||||
return $this->addRoute('PUT', $path, $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a PATCH route
|
||||
*/
|
||||
public function patch($path, $callback) {
|
||||
return $this->addRoute('PATCH', $path, $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a DELETE route
|
||||
*/
|
||||
public function delete($path, $callback) {
|
||||
return $this->addRoute('DELETE', $path, $callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add route to collection and return $this for chaining
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user