- Getting Started
- Architecture
- The Basics
- Digging Deeper
-
EDGE Components
- Introduction
- Activity Indicator
- Badge
- Bottom Navigation
- Bottom Sheet
- Button
- Button Group
- Canvas
- Carousel
- Checkbox
- Chip
- Column
- Divider
- Gesture Area
- Icon
- Image
- Lazy Grid
- Layout & Styling
- List
- Menus
- Modal
- Pressable
- Progress Bar
- Radio Group
- Refreshable
- Row
- Scroll View
- Select
- Shapes
- Side Navigation
- Slider
- Spacer
- Stack
- Tab Row
- Text
- Text Input
- Toggle
- Top Bar
- Virtual List
- Web View
- Plugins
- Testing
- Publishing Your App
System
Overview#
The System API covers system-level concerns — platform detection and opening the app's settings screen.
It's a core built-in: the facade resolves with nothing to install or register.
use Native\Mobile\Facades\System;
Platform detection#
System::isIos(); // true on iOSSystem::isAndroid(); // true on AndroidSystem::isMobile(); // true on either platform
Use these to branch behavior or conditionally render UI for a specific platform.
Each is also available as a global helper function — isIos(), isAndroid(), isMobile() — for terse use in
Blade and components:
if (isAndroid()) { // ...}
In Blade, the same checks are available as conditional directives:
@ios {{-- iOS-only markup --}}@endios @android {{-- Android-only markup --}}@endandroid @mobile {{-- running inside the native app (iOS or Android) --}}@endmobile @web {{-- running in a browser / outside the native app --}}@endweb
Each also supports the usual @else… and @unless… forms — @elseios, @unlessandroid, and so on.
App settings#
Open the app's page in the device Settings app — useful for sending a user to re-grant a permission they previously denied:
System::appSettings();
Appearance (light / dark)#
Reading the current appearance and reacting to theme changes lives with the rest of theming — see
Theming → Appearance in PHP for System::appearance(), isDarkMode(),
isLightMode(), the isDark() / theme() helpers, and the AppearanceChanged event.
in no time