Download the PHP package jabranr/lassi without Composer

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

Lassi (Not maintained anymore)

PHP boilerplate for quick projects using Slim Framework and Eloquent database.

Lassi

Lassi is a small PHP boilerplate to use Slim Framework with Eloquent database components – enabling you to quickly start building your PHP projects with an MVC design pattern and datastore in no time.

Warnning: Project is in alpha status. For more see issues tracker.

Installation and Setup

Install with composer create-project command. This will install Lassi and all of it's dependencies i.e. Slim Framework and Eloquent database.

Configuration

Lassi uses .env files to setup it's configuration. There is such sample file .sample.env packaged with it. Lassi will look for .dev.env, .dist.env or .env respectively at the run time or throws NotFoundException.

Charset & Collation

By default .sample.env file has charset and collation configurations set to UTF-8 mb4 to support various type of characters encoding. You can update it with your own choice, of course. For more on best encoding practices, read Working with UTF-8 at PHP: The Right Way.

Routing

Use the routes.php in root directory to setup routes. You would setup routes as you do in Slim Framework. Afterall it is using Slim Framework in background. For more on setting up routes, see Slim Framework Documentation.

Structure

Controllers: The Controllers are to be saved in controller/ directory. All Controllers must extend Lassi\App\Controller base controller class and pass the LassiLassi instance to its constructor using LassiLassi::getInstance() method. You can also add relevant Model(s) using useModel(string|array $model) method. You can name the controller as you like but do keep up with best practices.

Models: All relevant Models are saved in model/ directory and must extend the Illuminate\Database\Eloquent\Model class. You would use models as you do in Eloquent. For more on setting up models and use other options, see Eloquent database quick start guide.

There is an example controller and model in mentioned directories for you to get started with.

Views: All views/templates are saved in view/ directory.

Assets: All assets are saved in public/ directory.

Example:

Create project

Create a project using Composer create-project command and cd into project directory.

Update configuration

Update configurations as required in .dev.env file.

Start server

Start the PHP built-in server and navigate browser to http://localhost:8000.

Setup routes

Add a new route hello in routes.php and try it in browser by navigating to http://localhost:8000/hello

Add a new route goodbye in routes.php to render a template. Create a new file goodbye.php with basic HTML and save in /view directory.

Call this template to render directly from a route's definition or by using a Controller.

Directly from a route's definition

Using a controller

Add a new public method goodbye() to WelcomeController.php in /controller directory.

Modify the route's definition to use controller.

For complete reference, see Slim Framework documentation

Using Eloquent

To setup any database connection fill in the required information in relevant *.env file.

Setup SQLite database

At minimum it requires an absolute URL to SQLite file and db_driver value set to sqlite.

Setup MySQL, SQL, MSSQL or Sybase database

Using Eloquent is straight forward after a connection is established. To learn more on how to use Eloquent, see Official Eloquent Documentation.

Create a table using Eloquent

You can use the Illuminate\Database\Capsule\Manager::schema() method to setup database migrations. Here is an example to create a lassi_users table.

Calling Lassi\Controller\WelcomeController->makeUserTable() will create a new table in database.

A model can be added to a controller using useModel() method in controller's constructor i.e.

or it can directly be accessed using Lassi\Model namespace i.e.

Getting info from Eloquent and pass it to template.

Issue tracking

Please report any issues to repository issue tracker.

Contribution

I would love to get some help and extend this boilerplate further so it can be useful to a vast audience. If you think you can improve the boilerplate then fork the project and submit pull request at your convenience.

License

MIT License © 2015 – 2016 Jabran Rafique (@jabranr) | Contributors


All versions of lassi with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
slim/slim Version ^2.6
illuminate/database Version ^5.1
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 jabranr/lassi contains the following files

Loading the files please wait ....