Download the PHP package windwalker/warder without Composer
On this page you can find all versions of the php package windwalker/warder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download windwalker/warder
More information about windwalker/warder
Files in windwalker/warder
Package warder
Short Description A use package for Windwalker.
License LGPL-2.0-or-later
Homepage https://github.com/lyrasoft/warder
Informations about the package warder
Windwalker Warder
Installation Via Composer
Add this to composer.json
and run composer update
.
Register Package
Register warder to Windwalker, you can prepare an admin
and front
package to support backend and frontend.
Migration
Run php bin/console migration migrate -p=warder --seed
Or copy vendor/windwalker/warder/src/Migration
and vendor/windwalker/warder/src/Seed
files to
resources/migration
and resources/seed
You can add your own columns to support more profiles.
Copy Config
Copy vendor/windwalker/warder/src/config.dist.yml
to etc/package/warder.yml
.
Or copy this config code:
If your package not named admin
and front
, set the package alias in this config.
Register Routing
Add Warder's routing config and namespace aliases to your package that your package can auto fetch Warder pages.
Now go to /{front@routing}/login
your will see a login page auto fetched.
You can do same thing to admin
package
Then you can see User admin at /{admin@routing}/users
:
Override Objects and Templates
You can override warder's objects in your package. For example, create Front/Controller/User/LoginGetController.php
will load priority than Windwalker/Warder/Controller/User/LoginGetController.php
. You can override something in this class.
These files can be override:
Front:
Admin:
Override UserHandler and UserData
Change class.data
in config file that you can add some new methods:
Social Login
Warder use Hybrid Auth to support multiple OAuth social login.
Please install "hybridauth/hybridauth": "^2.6"
first.
After composer updated, copy vendor/wainwaler/warder/src/secret.dist.yml
to etc/secret.yml
Currently Warder only support facebook, twitter, google, yahoo and github.
Go to Documentation to see how to register apps and get API key and secret code.
When a social provider set to enabled, the button will auto appear to login page:
If you use
Additional Providers
likeGitHub
, you must copy provider class file fromvendor/hybridauth/hybridauth/additional-providers
tovendor/hybridauth/hybridauth/hybridauth/Hybrid/Providers