A learning project for Slim and RedBeansPHP ORM. It uses Composer.
While using Composer
, make sure you are using the latest version of PHP CLI and Composer
binary.
sudo /Applications/MAMP/bin/php/php7.3.8/bin/php composer_1.9.1.phar require slim/slim:"4.*"
sudo /Applications/MAMP/bin/php/php7.3.8/bin/php composer_1.9.1.phar require slim/psr7
sudo /Applications/MAMP/bin/php/php7.3.8/bin/php composer_1.9.1.phar require illuminate/database "~5.1"
sudo /Applications/MAMP/bin/php/php7.3.8/bin/php composer_1.9.1.phar require propel/propel "~2.0@dev"
.htaccess
in the application root folder
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
index.php/apix/
: call without .htaccess
apix/
: call with .htaccess
http://localhost:8888/3_study/4_php/study_005_slim/2_slimApp/public/apix/
http://localhost:8888/3_study/4_php/study_005_slim/2_slimApp/public/index.php/apix/
- Database conversation is by
beans
- Every
bean
has atype
andid
- The
id
is theprimary key
of the corresponding record - RedBeanPHP will keep changing the
schema
to fit your needs, this is called 'fluid mode'.