Download the PHP package frostybee/slim-mvc without Composer

On this page you can find all versions of the php package frostybee/slim-mvc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slim-mvc

Slim Framework Starter Template

A lightweight MVC web application starter template built on top of the Slim PHP microframework. Ideal for projects that require Slim's simplicity without sacrificing the benefits of a clean MVC architecture.

Why Using this Template?

This template provides a starting point for building web applications with the Slim 4 framework using the classic MVC (Model–View–Controller) pattern. It includes everything you need to get started, without the extra complexity of larger frameworks.

What's Included

This starter template follows best practices and adheres to industry standards:

Requirements

How Do I Use/Deploy this Template?

Option 1: Using Composer (Recommended)

Prerequisites:

Don't have a WAMP/LAMP stack installed? Use Option 2: Docker instead.

  1. Open a terminal in your web server's document root (i.e., htdocs).
  2. Run the following command:

    Replace [project-name] with your project name (e.g., worldcup-app).

  3. Open your [project-name]-app folder in VS Code.
  4. Adjust your database credentials in config/env.php (see below).

Option 2: Using Docker (macOS/Linux/Windows)

Docker allows you to run the application in containers without installing PHP, Apache, or MariaDB locally. This works on macOS, Linux, and Windows.

Prerequisites:

Quick Start:

  1. Clone the repository (since Composer requires PHP, which you may not have installed):

    Replace [project-name] with your project name (e.g., worldcup-app).

  2. Navigate to the project folder:

  3. Remove the .git folder to start fresh with your own repository:

  4. Start all containers by executing the following command:

    Note: Use docker-compose up -d --build to rebuild images after modifying the Dockerfile or related configurations.

  5. Access the application:

Configuring the Database:

The default database name is slim_mvc. To use a different database name:

  1. Update docker-compose.yml:

  2. Update config/env.docker.php:

  3. Rebuild containers: docker-compose up -d --build

Importing Database Schema:

To automatically import a database schema when the container starts:

  1. Place your .sql file(s) in the docker/init-db/ folder
  2. Start the containers: docker-compose up -d

The SQL files will be executed automatically on first container creation. If you have multiple files, they run in alphabetical order (e.g., 01-schema.sql, 02-data.sql).

To re-import the schema, remove the database volume and restart:

Database Credentials (for phpMyAdmin): Username Password
root secret
slim_user slim_pass

Common Commands:

Action Command
Start containers docker-compose up -d
Stop containers docker-compose down
View app logs docker-compose logs -f app
Run composer docker-compose exec app composer install
Delete database docker-compose down -v
Rebuild containers docker-compose up -d --build

Working with Multiple Projects:

If you run one project at a time, no configuration changes are needed. Simply stop one project before starting another:

If you need to run multiple projects simultaneously, change the port numbers in docker-compose.yml to avoid conflicts:

Option 3: Manual Installation

  1. Download this repository as a .zip file.
  2. Extract the downloaded slim-mvc-main.zip file locally.
  3. Copy the slim-mvc-main folder into your web server's document root (i.e., htdocs).
  4. Rename the slim-mvc-main folder to [project_name]-app (for example, worldcup-app).
  5. Open your [project_name]-app folder in VS Code.
  6. Install the project dependencies by running composer. If you are using Wampoon, open a terminal window in VS Code (hit ) then run .\composer.bat update
    • If you are not using Wampoon to develop your app, just run composer from the command line.
  7. In the config folder, make a copy of env.example.php and rename it to env.php.
  8. Adjust your database credentials (see below).

** You can always clone this repository. However, if you do, you need to remove the **hidden directory before you copy this template over to

How Do I Configure My Database Connection?

Follow the outlined instructions in config/env.example.php

How do I Use Composer with Wampoon?

To install or update your project dependencies deployed on Wampoon, use the composer.bat script as follows:

Action Command Description
Install dependencies ./composer.bat install Installs packages listed in composer.json and creates the vendor directory.
Update dependencies ./composer.bat update Refreshes all packages to the latest versions allowed by composer.json.
Add a package ./composer.bat require [package] Installs a new package and adds it to composer.json.
Regenerate autoloader ./composer.bat dump-autoload -o Rebuilds the optimized autoloader after adding or removing classes.

On Using Environment Variables

Sensitive information used in app such as your database credentials, API key, etc. MUST not be pushed into your Git repo.

Do not use .env files for storing environment specific application settings/configurations. Dotenv is not meant to be used in production

Just Google: "DB_PASSWORD" filetype:env Alternatively, you can visit the following link: Google env search

Instead, follow the instructions that are detailed in config/env.example.php

Project Structure

Here's how everything is organized:

Quick Development Tips

Adding Routes

Routes are defined in the app/Routes/ directory. Check out the existing route files to see how it's done.

Creating Controllers

Controllers go in app/Controllers/. They should extend the base controller class and follow PSR-4 autoloading.

Views and Templates

Templates are stored in app/Views/. The template engine is already configured and ready to use.

Configuration

App configuration lives in config/. Modify these files to customize your application settings.

Logging

Logs are written to the var/logs/ directory. Use the injected logger in your controllers to track what's happening.

Need Help?

Contributing

Got ideas for improvements? Found a bug? Pull requests are welcome!

Acknowledgments

The application's bootstrap process and structure of this starter template is based on slim4-skeleton by @odan. Many thanks to the original developers for their work!

License

This project is open-sourced under the MIT License. See the LICENSE file for the full details.



All versions of slim-mvc with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-pdo Version *
ext-json Version *
slim/slim Version ^4.14
slim/php-view Version ^3.4
php-di/php-di Version ^7.0
fig/http-message-util Version ^1.1
monolog/monolog Version ^3.9
slim/psr7 Version ^1.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package frostybee/slim-mvc contains the following files

Loading the files please wait ...