Download the PHP package samanix/laranix without Composer

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

Laranix

Build Status

About

Laranix by Samanix

Laranix provides extended functionality and more feature rich existing functions to Laravel.

It was done as a package, albeit a large one, so that it is more easily updated with new Laravel versions.

Contributions

Please use the issue tracker to report any issues, or submit via pull requests

Contributions are encouraged via pull requests

Security

For security related issues, please contact [email protected].

License

Laranix is open-sourced software licensed under the MIT license

Requirements

Features

AntiSpam

Provides invisible recaptcha entry on forms (sign up with Google), as well as a sequence ID field, which will prevent the form being submitted twice.

Auth

Custom auth package built on top of Laravels own, providing:

Foundation

Provides base packages and configs for your app.

Installer

Installs, publishes and copies files for Laranix to your app.

Session

Adds IP locking to sessions, not required if you don't want to use it.

Support

Adds extra functionality, including:

Themer

Provides themes and loads the files given, combines like for like files in to one automatically and updates if any file is added or changed

Tracker

Provides breadcrumb like tracking for user actions

Installation

Composer

composer require samanix\laranix

Or add "samanix\laranix": "~2.0" to your composer.json and then run composer update.

Service Providers

Services are automatically registered since Laravel 5.5 using package discovery in the composer.json.

However, in the config/app.php you may still wish to comment out or remove:

Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,

There are a number of other packages provided with the dev install of Laranix, see the documentation for them for help:

barryvdh/laravel-debugbar
barryvdh/laravel-ide-helper
laravel/dusk

Optional: Register Facades

Registered automatically since Laravel 5.5.

Artisan Commands

Registered automatically since Laravel 5.5.

However, before running any commands for Laranix:

Run php artisan laranix:install -AO.

See php artisan laranix:install --help for options.

The following commands are also run automatically if the required option is set:

php artisan vendor:publish --tag=laranix-configs
php artisan vendor:publish --tag=laranix-migrations
php artisan vendor:publish --tag=laravel-mail
php artisan vendor:publish --provider="Indal\Markdown\MarkdownServiceProvider"

If you skip these commands, you can run the artisan ones at a later time.

The command also attempts to run composer dump-autoload, if you get an error about this, please ensure you run manually afterwards.

Theme Commands

The basic theme for Laranix is copied to the resources/themes directory, you can either setup your compilers and/or copy the files to the public\themes directory, or you can use the command to symlink.

php artisan laranix:themer:link {theme} {images|styles|scripts}

Where the first argument is the theme key, and the 2nd corresponds to the folder required.

Controller

Laranix runs its own base controller, you can extend this class in your own controllers, or roll your own entirely, if you do either of these, remember to update the controllers installed by Laranix.

The Laranix base controller resides in \Laranix\Foundation\Controllers\Controller.

The base controller contains methods and traits that can be called that will scaffold certain scenarios.

Error Controller

Laranix provides a special error controller in App\Http\Controllers\Errors. This overrides certain parts of the foundation controller that allows the Themer to load, and display custom error pages using your global styles and scripts (as certain parts such as Themer are only autoloaded on get requests).

In order to use this, open app/Exceptions/Handler.php and add the following to the render method, above the current render statement:

$response = $this->container->make(App::class)->renderClientError($exception);

if ($response !== null) {
    return new Response($response, $exception->getStatusCode(), $exception->getHeaders());
}

Routes

There are some routes provided for authentication as well as an entry page, you are free to change these.

When running laranix:install, the web.php routes file is overwritten entirely with Laranix routes. Take a backup first if required.

It is only overwritten if the -O|overwrite parameter is set.

Events

Add the following to your app/Providers/EventServiceProvider.php inside the $listen array:

\Laranix\Auth\Email\Events\Updated::class => [
    \Laranix\Auth\Email\Listeners\Updated::class,
],
\Illuminate\Auth\Events\Logout::class => [
    \Laranix\Auth\Listeners\Logout::class,
],
\Illuminate\Auth\Events\Registered::class => [
    \Laranix\Auth\Listeners\Registered::class,
],
\Laranix\Auth\Password\Events\Updated::class => [
    \Laranix\Auth\Password\Listeners\Updated::class,
],

Add the following to your App\Providers\EventServiceProvider.php inside the $subscribe array (create if it does not exist):

\Laranix\Auth\Email\Verification\Events\Subscriber::class,
\Laranix\Auth\Events\Login\Subscriber::class,
\Laranix\Auth\Group\Events\Subscriber::class,
\Laranix\Auth\Password\Reset\Events\Subscriber::class,
\Laranix\Auth\User\Cage\Events\Subscriber::class,
\Laranix\Auth\User\Events\Subscriber::class,
\Laranix\Auth\User\Groups\Events\Subscriber::class,

You can always register your own listeners as well as or instead of the default provided.

Middleware

Open app/Http/Kernel.php and add the following to $routeMiddleware:

'antispam'  => \Laranix\AntiSpam\Middleware\Verify::class,

Then, add \Laranix\Tracker\Middleware\Flush::class to the $middleware array.

Configure

Open the config\auth.php and edit the providers array, add:

'laranixuser' => [
     'driver'   => 'eloquent',
     'model'    => \Laranix\Auth\User\User::class,
],

Then change the guards.web.provider value to laranixuser.

You may also wish to change the guards.api.provider to laranixuser too.

Next, open the config\mail.php and change the markdown.theme to laranix.

.env Files

Add/edit the following settings to your .env:

APP_VERSION=your-app-version
RECAPTCHA_KEY=site-key
RECAPTCHA_SECRET=secret-key
SESSION_DRIVER=laranix

Other Config files

Other configurations you can edit are:

laranixauth.php

Configures Auth components.

themer.php

Configures Themer component.

appsettings.php

Provides some extra custom settings for your app.

globalviewvars.php

Add variables that will be shared globally to all views.

themerdefaultfiles.php

Add files that Themer will load on all requests where Themer is initialised.

socialmedia.php

Provides links to various social media outlets, you are free to add your own.

defaultusergroups.php

Add and configure default user groups for when the database is seeded.

antispam.php

Configures AntiSpam components.

tracker.php

Configures Tracker component.

Other Packages

markdown.php

Remember to set escape_markup to true in this file if you are allowing user input.

Database

Run migrations using the php artisan migrate command.

Seed your database with your default user groups using php artisan db:seed --class=DefaultGroups if Laranix has been installed with the --D|seeds option.

Artisan Commands

In addition to the laranix:install command, Laranix also provides some other commands.

Remember to run php artisan <command> --help for options and information.

laranix:themer:link Links the image directory to the public theme image directory for the given theme.

laranix:themer:clear Clears compiled style and script files from themes.

laranix:tokens:clear Clears expired tokens from the database for given models.

Default models for Laranix tokens are:

Additional Notes

Views

Laranix provides several views to get you started, it also provides some mails in markdown format, so if you edit config\laranixauth.php to not use markdown on mails, you will have to edit the views in resources/views/mail/auth/.

Webpack

Remember to update webpack.mix.js if you roll your own theme settings.

Tests

See here.


All versions of laranix with dependencies

PHP Build Version
Package Version
Requires php Version ~7.1.0
andreasindal/laravel-markdown Version ~2.0
guzzlehttp/guzzle Version ~6.0
laravel/framework Version 5.5.*
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 samanix/laranix contains the following files

Loading the files please wait ....