Download the PHP package sleekphp/sleekphp without Composer

On this page you can find all versions of the php package sleekphp/sleekphp. 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 sleekphp

sleekPHP Framework Documentation

sleekPHP is a lightweight, beginner-friendly PHP framework inspired by Laravel, designed to simplify web development with an MVC structure, basic ORM, and migration capabilities.


Table of Contents


Installation

  1. Clone or download the sleekPHP repository.

  2. Navigate to the project root directory and install dependencies using Composer:

  3. Run the following command to set up autoloading for the framework:

  4. Start a local development server (details provided in Running the Development Server).

Folder Structure

Here’s the basic structure of the sleekPHP framework:


Core Components

1. Router

The router handles HTTP requests and directs them to the appropriate controllers. Define routes in the routes/web.php and routes/api.php files.

2. Controller

Controllers are located in app/Controllers. Each controller is responsible for handling requests and returning a response, usually by rendering a view.

3. View Engine

The view engine is designed to parse custom directives (@if, @foreach, @include) in .php files. Views are stored in app/Views.

4. ORM and Model

The base Model class in system/Core/Model.php provides a simple ORM, enabling basic CRUD operations, along with querying methods.

5. Database Migrations

The Schema and Blueprint classes in system/Database provide migration capabilities, allowing you to create and drop tables.


Creating Routes

Define routes in the routes/web.php file. Routes can be mapped to controller methods:


Creating Controllers

Controllers are PHP classes located in app/Controllers. Each method in the controller can be mapped to a route.

In this example, HomeController has an index method that loads the home.php view with data.


Using Views

View files are stored in app/Views and use the .php extension. The view engine supports:

Example view file:


Command Line Interface (CLI)

The sleek command file provides several commands for easy project management.

  1. Make Controller:

    This command creates a new controller in app/Controllers.

  2. Make Model:

    This command creates a new model in app/Models with an ORM structure.

  3. Make View:

    This command creates a new view file in app/Views.

  4. Make Migration:

    Creates a new migration file in database/migrations.

  5. Run Migrations:

    Runs all migrations, executing each up method to apply database changes.

  6. Run Development Server:

    Starts a development server at http://localhost:8000.


Using Models and ORM

The base Model class provides basic CRUD operations and querying capabilities.

Example usage:


Database Migrations

Define migrations to create or modify tables in database/migrations.

Example migration to create a users table:

To apply migrations, run:


Running the Development Server

To start the server, run:

The server will start at http://localhost:8000.


Environment Configuration

Environment variables are managed through the .env file. Common variables include:

Use getenv('VARIABLE_NAME') in your code to access these variables.


License

sleekPHP is open-source software, and you're free to modify and distribute it.


This documentation provides a foundational guide for sleekPHP. Let me know if you have further questions or would like more details!


All versions of sleekphp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 sleekphp/sleekphp contains the following files

Loading the files please wait ....