Download the PHP package sukohi/maven without Composer

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

Maven

A Laravel package to manage FAQ.
(This package is for Laravel 5.3+)

Demo

'Example'

Requirements

Installation

Execute the next command.

composer require sukohi/maven:4.*

Set the service providers in app.php

'providers' => [
    ...Others...,
    Collective\Html\HtmlServiceProvider::class,
    Sukohi\Cahen\CahenServiceProvider::class,
    Sukohi\Maven\MavenServiceProvider::class,
]

Also alias

'aliases' => [
    ...Others...,
    'Form' => Collective\Html\FormFacade::class,
    'Html' => Collective\Html\HtmlFacade::class,
    'Cahen'   => Sukohi\Cahen\Facades\Cahen::class,
    'Maven'   => Sukohi\Maven\Facades\Maven::class,
]

Then execute the next commands.

php artisan vendor:publish
php artisan migrate

Usage (Management page)

Set Maven::route() in your routes.php.

\Sukohi\Maven\Maven::route();

// or with default locale

\Sukohi\Maven\Maven::route('en');

Now you can access to http(s)://YOUR-DOMAIN/admin/maven.
Note: I believe that you need to authenticate in routes.php before calling Maven::route() using middleware or something.

[Config]
After publishing, you should have maven.php in your config folder.
you can set some values in the file like the followings.

locales

First of all, you have only en locale.
You can add more locales if you want like so.

'locales' => [
    'en' => 'English',
    'ja' => 'Japanese',
    'es' => 'Spanish'
],

// or

'locales' => [
    'ja' => '日本語',
    'en' => '英語',
    'es' => 'スペイン語'
],

// The keys and values refer locale symbols and language names.

URI

The default value is admin/maven.
So http(s)://YOUR-DOMAIN/admin/maven is the URL for managing FAQs.

Per Page

You can change maximum records per page.

Usage (Retrieve data)

[Basic Way]

$faqs = \Maven::get();

foreach ($faqs as $faq) {

    if($faq->hasLocale('en')) {

        // FAQ
        echo $faq->getQuestion('en');
        echo $faq->getRawQuestion('en');
        echo $faq->getAnswer('en');
        echo $faq->getRawAnswer('en');

        // Tag(s)
        $tags = $faq->getTags('en');    // Collection

        // Others
        echo $faq->sort_id;
        echo $faq->unique_key;
        echo $faq->created_at;
        echo $faq->updated_at;

    }

}

[Filtering]

Tag(s)

$faqs = \Maven::tag([
    'en' => 'YOUR-TAG'
])->get();

// or

$faqs = \Maven::tag([
    'en' => ['YOUR-TAG', 'YOUR-TAG'],
    'ja' => 'タグ'
])->get();

(Raminsadeghi indecated an error here for me. Thank you for kind of you!)

Unique Key

$faq = \Maven::uniqueKey('952557a09ef19aae1d9e2a276db18a66')->first();

// or 

$faqs = \Maven::uniqueKey([
    '952557a09ef19aae1d9e2a276db18a66', 
    'fashrtrhstgrfaeargthukfyhdredeff', 
])->get();

Pagination

{!! $faqs->links() !!}

All Tag(s)

$tags = \Maven::getAllTags();

// or with $draft_filter_flag

$tags = \Maven::getAllTags($draft_filter_flag = true);

In this case, if you'd like to get en tag(s), you should call like so.

$english_tags = $tags['en'];

Model Instance

In order to get model instance of this package, you can use getModel().

\Maven::getModel('unique_key');
\Maven::getModel('faq');
\Maven::getModel('tag');

Export/Import

You can two commands for export/import.

[Export]

php artisan maven:export

[Import]

php artisan maven:import

Contributor

PapaDragonov

License

This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh


All versions of maven with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ~5.2
laravelcollective/html Version ~5.2
sukohi/cahen Version 2.*
sukohi/neatness Version ~4.0.2
sukohi/smoothness Version 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 sukohi/maven contains the following files

Loading the files please wait ....