softon / slano
A simple PHP Framework using basic libraries.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Twig
Type:project
Requires
- bramus/router: ^1.5
- delight-im/auth: ^8.2
- lodev09/php-models: ^2.2
- rakit/validation: ^1.4
- twig/twig: ^3.3
- vlucas/phpdotenv: ^5.3
This package is auto-updated.
Last update: 2024-10-09 17:31:06 UTC
README
A simple PHP Framework for quick app development.
Installation
- Install Composer and PHP 5.4+
- use
composer create-project softon/slano --prefer-dist
to create a new slano project. - copy the
.env.sample
to.env
and update the environment variables. - (optional) run the below query which will create a basic authetication related tables.
- setup a virtual host and access the website.
- Done.
Libraries used in Slano Framework
Below libraries are used for building this framework. Link to the documentation to respective packages are provided.
- Twig (Template Engine): https://twig.symfony.com
- Bramus/router (Routing Library) : https://github.com/bramus/router
- Rakit/validation (Validation Library) : https://github.com/rakit/validation
- Vlucas/phpdotenv (Reading Environment Variables) : https://github.com/vlucas/phpdotenv
- Lodev09/php-models (Database Models) : https://github.com/lodev09/php-models
- Delight-im/auth (Authentication Library) : https://github.com/delight-im/PHP-Auth
SQL Database Query for Users (Optional)
CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL, `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `username` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` tinyint(2) UNSIGNED NOT NULL DEFAULT '0', `verified` tinyint(1) UNSIGNED NOT NULL DEFAULT '0', `resettable` tinyint(1) UNSIGNED NOT NULL DEFAULT '1', `roles_mask` int(10) UNSIGNED NOT NULL DEFAULT '0', `registered` int(10) UNSIGNED NOT NULL, `last_login` int(10) UNSIGNED DEFAULT NULL, `force_logout` mediumint(7) UNSIGNED NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE `users_confirmations` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL, `selector` varchar(16) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `expires` int(10) UNSIGNED NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE `users_remembered` ( `id` bigint(20) UNSIGNED NOT NULL, `user` int(10) UNSIGNED NOT NULL, `selector` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `expires` int(10) UNSIGNED NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE `users_resets` ( `id` bigint(20) UNSIGNED NOT NULL, `user` int(10) UNSIGNED NOT NULL, `selector` varchar(20) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `expires` int(10) UNSIGNED NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE `users_throttling` ( `bucket` varchar(44) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL, `tokens` float UNSIGNED NOT NULL, `replenished_at` int(10) UNSIGNED NOT NULL, `expires_at` int(10) UNSIGNED NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `email` (`email`); -- -- Indexes for table `users_confirmations` -- ALTER TABLE `users_confirmations` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `selector` (`selector`), ADD KEY `email_expires` (`email`,`expires`), ADD KEY `user_id` (`user_id`); -- -- Indexes for table `users_remembered` -- ALTER TABLE `users_remembered` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `selector` (`selector`), ADD KEY `user` (`user`); -- -- Indexes for table `users_resets` -- ALTER TABLE `users_resets` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `selector` (`selector`), ADD KEY `user_expires` (`user`,`expires`); -- -- Indexes for table `users_throttling` -- ALTER TABLE `users_throttling` ADD PRIMARY KEY (`bucket`), ADD KEY `expires_at` (`expires_at`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users_confirmations` -- ALTER TABLE `users_confirmations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users_remembered` -- ALTER TABLE `users_remembered` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users_resets` -- ALTER TABLE `users_resets` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;