Download the PHP package laravolt/mural without Composer

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

Laravolt Mural

Travis-CI Build Status Coverage Status

Laravolt Mural bertujuan menyediakan fitur komentar yang siap dipakai dan mudah diintegrasikan ke dalam aplikasi berbasis Laravel.

Package ini masih dalam tahap pengembangan dan belum dianjurkan untuk digunakan dalam produksi.

Requirement

Instalasi

Update composer.json

Untuk Laravel 5.2

Bisa dengan menjalankan perintah:

composer require laravolt/mural

Atau menambahkan deklarasi berikut ke file composer.json:

"require": {
    ...
    "laravolt/mural": "^1.0"
},

Untuk Laravel 5.1

Tambahkan deklarasi berikut ke file composer.json:

"require": {
    ...
    "laravolt/mural": "^0.5"
}

Service Provider

Laravolt\Mural\ServiceProvider::class,

Facade

'Mural'  => Laravolt\Mural\Facade::class,

Migration

php artisan vendor:publish
php artisan migrate

Ini akan menambahkan file migrasi baru 2015_08_17_101000_create_comments_table.php sekaligus menjalan migrasi tersebut. Tabel baru bernama comments akan ditambahkan ke basisdata.

Config mural.php

Isi default_commentable dengan deklarasi class model yang bisa dikomentari

'default_commentable' => \App\Post::class,

Penggunaan

Untuk setiap model yang bisa dikomentari, tambahkan trait dan interface seperti berikut:

Penambahan CommentableTrait otomatis akan menjadikan model Post memiliki relasi morphMany terhadap Laravolt\Mural\Comment. Karena ini relasi eloquent biasa, maka Anda bisa melakukan hal-hal berikut ini:

Untuk model yang ditunjuk sebagai komentator, tambahkan interface Commentator.

Shortcut

Menampilkan Widget Komentar

Untuk menampilkan widget komentar, seperti yang biasa ditemui di kebanyakan blog, tambahkan kode berikut di view Anda:

$post = App\Models\Post::find(1);
{!! Mural::render($post, 'sample-room') !!}

Selesai, laravolt/mural sudah dilengkapi dengan Model, Controller, dan View yang siap pakai, hasilnya seperti dibawah ini:

Anda juga bisa mengelompokkan komentar berdasar room tertentu, sehingga untuk satu konten bisa memiliki banyak kelompok komentar.

{!! Mural::render($post, 'collaborator') !!}
{!! Mural::render($post, 'you-can-put-anything-here') !!}

// readonly, user tidak bisa submit komentar
{!! Mural::render($post, 'room', ['readonly' => true]) !!}

Untuk masalah tampilan, saat ini skin yang didukung adalah semantic-ui. Bootstrap segera menyusul (yang berminat bisa kirim Pull Request).

Menambah Komentar

Mural::addComment($post, 'komentar lagi', 'collaborator'); // room = collaborator

Mendapatkan Komentar

Mural::getComments($post, 'room', []);

Event

Nama event Kapan dipanggil Parameter
mural.render Ketika widget mural ditampilkan di view $content
mural.comment.add Ketika ada komentar baru $comment, $content, $user, $room
mural.comment.remove Ketika suatu komentar dihapus $comment, $user

Configuration

Testing

Karena sepertinya akibat package Orchestral/testbench, phpunit harus dijalankan dari lokal vendor, tidak bisa dari global phpunit

Roadmap

Testing


All versions of mural with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.1
php Version >=5.3.0
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 laravolt/mural contains the following files

Loading the files please wait ....