Download the PHP package jcombee/nativephp-win-pre without Composer
On this page you can find all versions of the php package jcombee/nativephp-win-pre. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nativephp-win-pre
WinPre
About The Project
WinPre is a library for NativePHP. It aims at helping you with orchestrating a application with multiple windows.
Getting Started
Prerequisites
Before you are able to install the package you will need to meet these requirements:
- Running a application with
laravel/framework
version 11 or higher. - Running a application with
nativephp/laravel
version 0.6.2 or higher.
Installation
-
To install WinPre in the root of your project run:
- You can now publish the example preset file (
routes/window.php
).
Usage
Open your first window
While following the Installation steps you have, by default, created a preset for the main window that looks like this:
To actually be able to open a window with this preset follow these steps:
- Remove the
Window::open();
fromapp/Providers/NativeAppServiceProvider.php
- Now fill the
boot()
function with:\JCombee\Native\WinPre\Facades\WinPre::open('main')
- Run
php artisan native:serve
Now you will see that the first window will be opened based on the settings you have set in the preset.
Pass through parameters
(under construction)
Sometimes you might want to add some dynamic configuration to your window, for instance the url. To do this we can add parameters to our preset.
To do this we first add a new preset in routes/window.php
:
To open this preset we call:
By calling this it will take the parameter called dish and replace this in the id for the window.
Roadmap
- [x] Initial project setup
- [ ] Add Additional Examples / Documentation
- [x] Creating simple presets
- [ ] Pass through parameters
- [x] Making the parameter available in the preset
- [ ] Replacing the parameter in the id
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Jerke Combee - @JCombee - [email protected]
Project Link: https://github.com/JCombee/nativephp-win-pre