Download the PHP package mohdnazrul/laravel-propel without Composer

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

propel-laravel

Propel2 integration for Laravel framework. Only 5.x versions supported. 4.x version can be found in repo of initial developer of current package.

Usage

First of all: you need to understand that current package is in heavy development. We try to maintain 1.* branch as stable and tested as it used by 1M of angry developers, which have guns. Propel2 seems pretty stable, but still in development and currently it require that your installation must have minimum stability is alpha. Open your composer.json and write after config section:

"config": {
    "preferred-install": "dist"
},
"minimum-stability": "dev"

Require this package with composer using the following command:

composer require mohdnazrul/propel-laravel

After updating composer, add the ServiceProviders to the providers array in config/app.php

Propel\PropelLaravel\PropelIntegrationServiceProvider::class,

Next step is copy example config to your config directory.

php ./artisan vendor:publish --provider 'Propel\PropelLaravel\RuntimeServiceProvider'

Within provided config: schemas files are located into database/ folder, models are generated into app/models, migrations into database/migrations

You can now use Propel commands via artisan, for example:

php ./artisan propel:model:build

etc.

Using integration command

For new users of propel there is command providing basic integration features like creating sample schema.xml file:

php ./artisan propel:laravel:init

Manual integration

You can find explanation what do integration command below.

Existing database

If you are trying Propel2 on existing database — you can use reverse database command:

php ./artisan propel:database:reverse

Since version 2.0.0-alpha5 there is awesome config node exclude_tables in config, which allows you to mix different project tables in one database.

Small hint: you can define namespace of all generated models in schema just as attribute of database:

<database … namespace="MyApp\Models">

Auth

Package contains Auth driver binding which allows to store user info and fetch (Auth::getUser()) current logged in user as propel model. You need to change two settings in config/auth.php:

'driver' => 'propel', // custom auth provider implemented in current package
…
'model' => MyApp\Models\User::class, // classname of user entity

After schema creating and model generation you must enhance your model to implement all laravel Auth requirements. Generic user model seems so:

use MyApp\Models\Base\User as BaseUser;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;

class User extends BaseUser implements AuthenticatableContract, CanResetPasswordContract
{
    use Authenticatable, CanResetPassword;

    public function getAuthIdentifier()
    {
        return $this->id;
    }
}

Static Configuration

By default it builds configuration from main config config/propel.php in runtime but you may build static config config/propel/config.php by running

php ./artisan propel:config:convert

Services

No service is provided.

Propel configures and manages itself by using static methods and its own service container, so no service is registered into Application.

Upgrade guide

There is upgrade guide in docs folder.

Known issues

Authors

First version written by Alex Kazynsky. Now maintained by Alexander Zhuralvev and Maxim Soloviev. Thanks a lot to each author! Any bug reports and pull requests are appreciated!

See also

Make Propel models work with Laravel Form::model() without making it an array


All versions of laravel-propel with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
laravel/framework Version 10.*
propel/propel Version ^2.0.0-beta3
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 mohdnazrul/laravel-propel contains the following files

Loading the files please wait ....