2017 © Pedro Peláez
 

library form-action

Your package description here.

image

sukohi/form-action

Your package description here.

  • Thursday, July 14, 2016
  • by Sukohi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

FormAction

A Laravel package to manage action URL of form tag. (This package is for Laravel 5+), (*1)

Installation

Execute composer command., (*2)

composer require sukohi/form-action:2.*

Register the service provider in app.php, (*3)

'providers' => [
    ...Others...,
    Sukohi\FormAction\FormActionServiceProvider::class,
]

Also alias, (*4)

'aliases' => [
    ...Others...,
    'FormAction' => Sukohi\FormAction\Facades\FormAction::class,
]

Preparation

First of all, execute migrate command from the package., (*5)

php artisan vendor:publish --provider="Sukohi\FormAction\FormActionServiceProvider"

Now, you have formaction.php in your config folder. So you need to set route or path there like so., (*6)

return [

    /*
     * Routes
     */
    'routes' => [
        'home.login' => 'home.authenticate' // When current route is `home.login`, return `route('home.authenticate')`.
    ],

    /*
     * Paths
     */
    'paths' => [
        '/login' => 'auth/authenticate' // When current path is `/login`, return `/auth/authenticate`.
    ]

];

Usage

Simple Usage, (*7)

<form action="{{ FormAction::get() }}">

with Options, (*8)

[Default Path], (*9)

<form action="{{ FormAction::get(['default' => '/default_path']) }}">

[Route Parameters], (*10)

<form action="{{ FormAction::get(['parameters' => [1, 2, 3]]) }}">

Using route() method, (*11)

<form action="{{ FormAction::route() }}">

[with Parameters], (*12)

<form action="{{ FormAction::route(1) }}">
<form action="{{ FormAction::route([1, 2, 3]) }}">

[with Default Path], (*13)

<form action="{{ FormAction::route(1, '/default_path') }}">

Using path() method, (*14)

<form action="{{ FormAction::path() }}">

[with Default Path], (*15)

<form action="{{ FormAction::path('/default_path') }}">

License

This package is licensed under the MIT License., (*16)

Copyright 2016 Sukohi Kuhoh, (*17)

The Versions

14/07 2016

2.0.x-dev

2.0.9999999.9999999-dev

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

14/07 2016

dev-master

9999999-dev

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

14/07 2016

2.0.2

2.0.2.0

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

14/07 2016

2.0.1

2.0.1.0

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

14/07 2016

2.0.0

2.0.0.0

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi