-
Notifications
You must be signed in to change notification settings - Fork 3
Managers‐Reference
Complete reference for all 22 managers available in zilleali/mikrotik-laravel.
| Manager | Facade Method | Since | Description |
|---|---|---|---|
| PppoeManager | MikroTik::pppoe() |
v1.0.0 | PPPoE secrets, profiles, sessions |
| HotspotManager | MikroTik::hotspot() |
v1.0.0 | Hotspot users, vouchers, active hosts |
| QueueManager | MikroTik::queue() |
v1.0.0 | Simple/tree queues, bulk limits |
| FirewallManager | MikroTik::firewall() |
v1.0.0 | Filter, NAT, mangle, address lists |
| SystemManager | MikroTik::system() |
v1.0.0 | Resources, health, logs, ping |
| InterfaceManager | MikroTik::interfaces() |
v1.0.0 | Traffic, VLANs, enable/disable |
| DhcpManager | MikroTik::dhcp() |
v1.0.0 | Leases, servers, static conversion |
| WirelessManager | MikroTik::wireless() |
v1.0.0 | Registration table, access list |
| IpPoolManager | MikroTik::ipPool() |
v1.0.0 | Pools, used addresses |
| RadiusManager | MikroTik::radius() |
v1.0.0 | Servers, incoming CoA |
| RouterUserManager | MikroTik::routerUsers() |
v1.0.0 | Users, groups, sessions |
| VpnManager | MikroTik::vpn() |
v1.0.0 | WireGuard, L2TP, PPTP |
| BridgeManager | MikroTik::bridge() |
v1.1.0 | Bridges, ports, host table, filters |
| IpAddressManager | MikroTik::ipAddress() |
v1.2.0 | IP address CRUD, enable/disable |
| ArpManager | MikroTik::arp() |
v1.2.0 | ARP table, static entries, MAC lookup |
| DnsManager | MikroTik::dns() |
v1.2.0 | Static DNS, cache, domain blocking |
| RouteManager | MikroTik::routes() |
v1.2.0 | Static routes, default gateway |
| NtpManager | MikroTik::ntp() |
v1.2.0 | NTP config, timezone, sync status |
| ScriptManager | MikroTik::scripts() |
v1.2.0 | Scripts, schedulers |
| SyslogManager | MikroTik::syslog() |
v1.2.0 | Remote logging, rules |
| SessionMonitor | MikroTik::sessionMonitor() |
v1.2.0 | PPPoE + Hotspot session tracking |
| UsageTracker | MikroTik::usageTracker() |
v1.2.0 | Per-user bandwidth monitoring |
| Class | Namespace | Since | Description |
|---|---|---|---|
| RouterosClient | Connections |
v1.0.0 | Plain TCP API connection |
| RouterosClientSSL | Connections |
v1.1.0 | TLS encrypted API connection |
| ConnectionPool | Connections |
v1.1.0 | Persistent connection management |
| CachingProxy | Support |
v1.0.0 | TTL caching layer |
| RateLimiter | Support |
v1.2.0 | API call throttling |
Facade: MikroTik::pppoe()
Since: v1.0.0
| Method | Description |
|---|---|
getSecrets() |
All PPPoE secrets |
getSecret($name) |
Single secret by name |
createSecret($data) |
Create new secret |
deleteSecret($name) |
Delete secret |
enableSecret($name) |
Enable secret |
disableSecret($name) |
Disable secret |
bulkEnable($names) |
Enable multiple secrets |
bulkDisable($names) |
Disable multiple secrets |
getActiveSessions() |
All active PPPoE sessions |
getSessionByIp($ip) |
Session by IP address |
kickSession($name) |
Disconnect user session |
bulkKick($names) |
Disconnect multiple sessions |
getProfiles() |
All PPPoE profiles |
Facade: MikroTik::hotspot()
Since: v1.0.0
| Method | Description |
|---|---|
getUsers() |
All hotspot users |
getUser($name) |
Single user by name |
createUser($data) |
Create new user |
deleteUser($name) |
Delete user |
enableUser($name) |
Enable user |
disableUser($name) |
Disable user |
getActiveHosts() |
Active hotspot sessions |
kickHost($name) |
Disconnect active host |
generateVouchers($count, $profile, $prefix) |
Generate vouchers |
getProfiles() |
All hotspot profiles |
Facade: MikroTik::queue()
Since: v1.0.0
| Method | Description |
|---|---|
getSimpleQueues() |
All simple queues |
getQueue($name) |
Single queue by name |
createQueue($data) |
Create new queue |
updateQueue($name, $data) |
Update queue |
deleteQueue($name) |
Delete queue |
setLimit($name, $upload, $download) |
Set bandwidth limit |
bulkSetLimit($users) |
Set limits for multiple users |
enableQueue($name) |
Enable queue |
disableQueue($name) |
Disable queue |
getTreeQueues() |
All tree queues |
Facade: MikroTik::firewall()
Since: v1.0.0
| Method | Description |
|---|---|
getFilterRules() |
All filter rules |
addFilterRule($data) |
Add filter rule |
getNatRules() |
All NAT rules |
addNatRule($data) |
Add NAT rule |
getMangleRules() |
All mangle rules |
addMangleRule($data) |
Add mangle rule |
getAddressLists() |
All address lists |
addToAddressList($ip, $list, $comment) |
Add IP to list |
removeFromAddressList($ip, $list) |
Remove IP from list |
isIpInList($ip, $list) |
Check if IP is in list |
Facade: MikroTik::system()
Since: v1.0.0
| Method | Description |
|---|---|
getResources() |
CPU, RAM, uptime, version |
getHealth() |
Temperature, voltage |
getIdentity() |
Router name |
getLogs($count) |
System logs |
getCpuLoad() |
CPU load percentage |
getUptime() |
Router uptime string |
ping($host) |
Ping from router |
reboot() |
Reboot router |
Facade: MikroTik::interfaces()
Since: v1.0.0
| Method | Description |
|---|---|
getInterfaces() |
All interfaces |
getInterface($name) |
Single interface |
getRunningInterfaces() |
Running interfaces only |
getDisabledInterfaces() |
Disabled interfaces only |
getVlanInterfaces() |
VLAN interfaces only |
getEthernetInterfaces() |
Ethernet interfaces only |
enableInterface($name) |
Enable interface |
disableInterface($name) |
Disable interface |
getTraffic($name) |
TX/RX traffic stats |
Facade: MikroTik::dhcp()
Since: v1.0.0
| Method | Description |
|---|---|
getLeases() |
All DHCP leases |
getLeaseByMac($mac) |
Lease by MAC address |
getLeaseByIp($ip) |
Lease by IP address |
makeStatic($mac) |
Convert lease to static |
deleteLease($mac) |
Delete lease |
getServers() |
All DHCP servers |
getActiveLeaseCount() |
Count active leases |
Facade: MikroTik::wireless()
Since: v1.0.0
| Method | Description |
|---|---|
getInterfaces() |
Wireless interfaces |
getRegistrationTable() |
Connected clients |
getClientsByInterface($iface) |
Clients on interface |
getClientCount() |
Total connected clients |
getAccessList() |
Access list entries |
addToAccessList($mac) |
Add MAC to access list |
removeFromAccessList($mac) |
Remove MAC from list |
Facade: MikroTik::ipPool()
Since: v1.0.0
| Method | Description |
|---|---|
getPools() |
All IP pools |
getPool($name) |
Single pool by name |
createPool($data) |
Create new pool |
deletePool($name) |
Delete pool |
getUsedAddresses($pool) |
Used addresses in pool |
getUsedAddressCount($pool) |
Count used addresses |
Facade: MikroTik::radius()
Since: v1.0.0
| Method | Description |
|---|---|
getServers() |
All RADIUS servers |
getServerByAddress($ip) |
Server by IP |
addServer($data) |
Add RADIUS server |
removeServer($ip) |
Remove server |
enableServer($ip) |
Enable server |
disableServer($ip) |
Disable server |
isServerActive($ip) |
Check if server active |
getIncomingConfig() |
CoA incoming config |
Facade: MikroTik::routerUsers()
Since: v1.0.0
| Method | Description |
|---|---|
getUsers() |
All router users |
getUser($name) |
Single user |
addUser($data) |
Add user |
deleteUser($name) |
Delete user |
changePassword($name, $pass) |
Change password |
enableUser($name) |
Enable user |
disableUser($name) |
Disable user |
getGroups() |
All user groups |
getActiveSessions() |
Active Winbox/SSH/API sessions |
isUserActive($name) |
Check if user has active session |
Facade: MikroTik::vpn()
Since: v1.0.0
| Method | Description |
|---|---|
getWireGuardInterfaces() |
WireGuard interfaces |
getWireGuardPeers() |
All WireGuard peers |
getPeersByInterface($iface) |
Peers on interface |
addWireGuardPeer($data) |
Add WireGuard peer |
removeWireGuardPeer($key) |
Remove peer by public key |
getL2tpSessions() |
Active L2TP sessions |
getL2tpSecrets() |
L2TP secrets |
getPptpSessions() |
Active PPTP sessions |
getTotalActiveSessions() |
Total VPN sessions |
Facade: MikroTik::bridge()
Since: v1.1.0
| Method | Description |
|---|---|
getBridges() |
All bridges |
getBridge($name) |
Single bridge |
addBridge($data) |
Create bridge |
removeBridge($name) |
Remove bridge |
getBridgePorts() |
All bridge ports |
getBridgePortsByBridge($bridge) |
Ports on bridge |
getPortCount($bridge) |
Port count on bridge |
addBridgePort($data) |
Add port to bridge |
removeBridgePort($interface) |
Remove port |
getBridgeHosts() |
Bridge host table |
getBridgeHostsByBridge($bridge) |
Hosts on bridge |
getBridgeFilters() |
L2 filter rules |
addBridgeFilter($data) |
Add filter rule |
Facade: MikroTik::ipAddress()
Since: v1.2.0
| Method | Description |
|---|---|
getAddresses() |
All assigned IPs |
getAddress($address) |
Single address |
getAddressesByInterface($iface) |
IPs on interface |
getAddressCount() |
Total address count |
isAddressAssigned($address) |
Check if IP assigned |
addAddress($data) |
Add IP to interface |
updateAddress($address, $data) |
Update address |
removeAddress($address) |
Remove address |
enableAddress($address) |
Enable address |
disableAddress($address) |
Disable address |
Facade: MikroTik::arp()
Since: v1.2.0
| Method | Description |
|---|---|
getArpTable() |
Full ARP table |
getArpByIp($ip) |
Entry by IP |
getArpByMac($mac) |
Entry by MAC |
getArpByInterface($iface) |
Entries by interface |
getStaticArpEntries() |
Static entries only |
getMacByIp($ip) |
MAC address for IP |
getIpByMac($mac) |
IP address for MAC |
addStaticArp($ip, $mac, $iface, $comment) |
Add static entry |
removeArp($ip) |
Remove entry |
flushArpCache() |
Flush dynamic entries |
Facade: MikroTik::dns()
Since: v1.2.0
| Method | Description |
|---|---|
getSettings() |
DNS settings |
setServers($servers) |
Set upstream servers |
enableRemoteRequests() |
Enable DNS server |
disableRemoteRequests() |
Disable DNS server |
isRemoteRequestsAllowed() |
Check DNS server status |
getCacheEntries() |
DNS cache entries |
flushCache() |
Flush DNS cache |
getStaticEntries() |
All static entries |
getStaticEntry($name) |
Single static entry |
addStaticEntry($name, $address, $ttl, $comment) |
Add entry |
updateStaticEntry($name, $data) |
Update entry |
removeStaticEntry($name) |
Remove entry |
blockDomain($domain, $comment) |
Block domain |
unblockDomain($domain) |
Unblock domain |
Facade: MikroTik::routes()
Since: v1.2.0
| Method | Description |
|---|---|
getRoutes() |
All routes |
getActiveRoutes() |
Active routes only |
getDefaultRoute() |
Default gateway route |
getRouteByDestination($dst) |
Route by destination |
getRoutesByGateway($gw) |
Routes by gateway |
addRoute($dst, $gw, $distance, $comment) |
Add static route |
updateRoute($dst, $data) |
Update route |
removeRoute($dst) |
Remove route |
enableRoute($dst) |
Enable route |
disableRoute($dst) |
Disable route |
Facade: MikroTik::ntp()
Since: v1.2.0
| Method | Description |
|---|---|
getClientSettings() |
NTP client config |
isEnabled() |
Check if NTP enabled |
isSynced() |
Check sync status |
enable() |
Enable NTP client |
disable() |
Disable NTP client |
setServers($primary, $secondary) |
Set by IP |
setServersByDns($primary, $secondary) |
Set by DNS |
getSyncStatus() |
Full sync details |
getSystemClock() |
Clock info |
getCurrentTime() |
Current time string |
getCurrentDate() |
Current date string |
getTimezone() |
Current timezone |
setTimezone($tz) |
Set timezone |
Facade: MikroTik::scripts()
Since: v1.2.0
| Method | Description |
|---|---|
getScripts() |
All scripts |
getScript($name) |
Single script |
getScriptCount() |
Total script count |
addScript($name, $source, $policy, $comment) |
Add script |
updateScript($name, $data) |
Update script |
removeScript($name) |
Remove script |
runScript($name) |
Execute script |
getSchedulers() |
All schedulers |
getScheduler($name) |
Single scheduler |
addScheduler($name, $onEvent, $interval, $startTime, $comment) |
Add scheduler |
updateScheduler($name, $data) |
Update scheduler |
removeScheduler($name) |
Remove scheduler |
Facade: MikroTik::syslog()
Since: v1.2.0
| Method | Description |
|---|---|
getTargets() |
All logging targets |
getTarget($name) |
Single target |
getRemoteTargets() |
Remote targets only |
hasRemoteLogging() |
Check if remote configured |
addRemoteTarget($name, $ip, $port, $comment) |
Add remote target |
updateTarget($name, $data) |
Update target |
removeTarget($name) |
Remove target |
getRules() |
All logging rules |
addRule($topics, $action) |
Add rule |
removeRule($topics, $action) |
Remove rule |
setupRemoteSyslog($name, $ip, $port, $topics) |
One-call setup |
Facade: MikroTik::sessionMonitor()
Since: v1.2.0
| Method | Description |
|---|---|
getAllActiveSessions() |
PPPoE + Hotspot combined |
getTotalSessionCount() |
Total active sessions |
getPppoeSessionCount() |
PPPoE session count |
getHotspotSessionCount() |
Hotspot session count |
isUserOnline($username) |
Check if user online |
getUserSession($username) |
User session details |
getSessionsLongerThan($minutes) |
Sessions by uptime |
getSessionsByIp($ip) |
Sessions by IP |
getSummary() |
NOC dashboard summary |
Facade: MikroTik::usageTracker()
Since: v1.2.0
| Method | Description |
|---|---|
getInterfaceTraffic($iface) |
Interface traffic stats |
getAllInterfaceTraffic() |
All interfaces traffic |
getPppoeUserUsage($username) |
Per-user bandwidth |
getAllPppoeUsage() |
All users bandwidth |
getTopUsers($limit) |
Top bandwidth consumers |
getTotalNetworkUsage() |
Network totals |
bytesToMb($bytes) |
Convert bytes to MB |
bytesToGb($bytes) |
Convert bytes to GB |
📝 Found an error or missing info?
Edit this page or open an issue to suggest improvements.