NativePHP
📲  Join the NativePHP for mobile Early Access Program →

Dialogs


NativePHP is currently in beta

Let's get to v1!

#Native Dialogs

NativePHP allows you to trigger many native dialogs.

Dialogs are created using the Dialog facade.

Copied!
use Native\Laravel\Dialog;

#The Share Dialog

You may open the native share dialog by using the Dialog::share() method.

Copied!
Dialog::share('Title', 'Description', 'URL');

#The Alert Dialog

You may open a native alert dialog by using the Dialog::alert() method.

Copied!
$buttons = [
'Ok',
'Cancel'
];
 
Dialog::share('Title', 'Message', $buttons, fn ($selected) => {
echo "You selected {$buttons[$selected]}";
});