2017 © Pedro Peláez
 

library ui

Laravel package to use with Mach3Builders' User Interface

image

mach3builders/ui

Laravel package to use with Mach3Builders' User Interface

  • Monday, July 23, 2018
  • by Mach3Builders
  • Repository
  • 1 Watchers
  • 0 Stars
  • 93 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 26 Versions
  • 22 % Grown

The README.md

Mach3Builders UI helpers

This package contains helper functions to assist our user interface package. see ui.mach3builders.nl for more information on how to get started with it., (*1)

Installation

composer require mach3builders/ui
php artisan vendor:publish --tag=public --force
php artisan vendor:publish --tag=config --force

Next install the @mach3builders/ui package and include the CSS and JS needed., (*2)

Usage

alert

To show and alert (or notification) you can use the alert helper. After being redirected the alert will show on screen., (*3)

public function store()
{
    alert('message', 'succes');

    redirect('/home');
}

Or you could use the helper like this, (*4)

alert('message')->type('succes');
alert('message')->dissmissable();
alert('message')->icon('user');

redirect()->alert('message', 'succes');

notify

Works the same as alert, with a few different methods, (*5)

notify('message')->type('succes');
notify('message')->icon('user');

redirect()->notify('message', 'succes');

Next you need to add the components to your blade layout, (*6)

@include('ui::components.alert')
@include('ui::components.notify')

Delete modal

Creates a delete button with a modal to confirm deletion. When the confirm button is pressed a DELETE request is made the the given action., (*7)

@component('ui::actions.delete', ['action' => "/user/{$user->id}"])
    Are you sure you want to delete {{ $user->name }}
@endcomponent

You can also use the following slots:, (*8)

  • action: The url where to send a DELETE request to upon confirmation
  • icon: An font awesome icon class
  • title: Modal title
  • main: Modal body
  • tooltip: Tooltip text
@component('ui::actions.delete', ['action' => "/model/{$id}"])
    {!! trans('taxes.delete-body') !!}
@endcomponent

Mail layout

Extend this for the basic mail layout (old version), (*9)

@extends('ui::mail.layout')

You have the following sections, (*10)

  • style: This will be set in the header. use
  • logo: Place a image tag on the top of the mail, this is outside the mail wrapper
  • content: Main body of the email
  • footer: Footer at the bottom of the email, inside the wrapper
  • unsubscribe: Unsubscribe text at the end of the email

Extend this for the basic mail layout (new version), (*11)

@extends('ui::notifications.mail')

You can use the recommended mail formatting of Laravel, (*12)

return (new MailMessage)
        ->greeting('Hello!')
        ->line('One of your invoices has been paid!')
        ->action('View Invoice', $url)
        ->line('Thank you for using our application!');

Invoices: subscription

return view('ui::invoices.subscription', [
    'customer_company_name' => 'PKHold BV',
    'customer_name' => 'Paul Kruijt',
    'customer_street' => 'Piet Mondriaansingel 30',
    'customer_zipcode' => '3059 PD',
    'customer_city' => 'Rotterdam',
    'customer_country' => 'Nederland',
    'invoice_number' => 'M3B-000001',
    'invoice_date' => '01-01-2021',
    'payment_id' => 'tr_qwerty',
    'platform_name' => 'Mach3Platform',
    'plan_name' => 'Professional',
    'plan_info' => 'Betaald voor Mach3Builders',
    'plan_period' => '01-01-2021 tot 01-01-2022',
    'plan_price' => '€ 19,95',
    'invoice_tax' => '€ 4,19',
    'invoice_total' => '€ 24,14',
    'payment_method' => 'iDEAL',
]);

The Versions

23/07 2018

dev-master

9999999-dev

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

23/07 2018

v1.0.17

1.0.17.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

15/06 2018

v1.0.16

1.0.16.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

15/06 2018

dev-develop

dev-develop

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.15

1.0.15.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.14

1.0.14.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

dev-release/1.0.14

dev-release/1.0.14

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.13

1.0.13.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

dev-release/1.0.13

dev-release/1.0.13

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.12

1.0.12.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.11

1.0.11.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

dev-release/1.0.11

dev-release/1.0.11

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.10

1.0.10.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

dev-release/1.0.10

dev-release/1.0.10

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.9

1.0.9.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

dev-release/1.0.9

dev-release/1.0.9

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.8

1.0.8.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

dev-feature/form-alert

dev-feature/form-alert

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

v1.0.7

1.0.7.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

02/02 2018

dev-hotfix/alert-markup

dev-hotfix/alert-markup

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

30/01 2018

dev-hotfix/readme-changes

dev-hotfix/readme-changes

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

30/01 2018

v1.0.6

1.0.6.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

30/01 2018

v1.0.5

1.0.5.0

Laravel package to use with Mach3Builders' User Interface

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard
by Paul Kruijt

26/01 2018

v1.0.4

1.0.4.0

Laravel package to use with mach3builders/ui

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard

12/01 2018

v1.0.3

1.0.3.0

Laravel package to use with mach3builders/ui

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard

12/01 2018

v1.0.2

1.0.2.0

Laravel package to use with mach3builders/ui

  Sources   Download

The Requires

  • php ^7.0

 

by Robbin Benard