承接 sukohi/form-action 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sukohi/form-action

Composer 安装命令:

composer require sukohi/form-action

包简介

Your package description here.

README 文档

README

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

Installation

Execute composer command.

composer require sukohi/form-action:2.*

Register the service provider in app.php

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

Also alias

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

Preparation

First of all, execute migrate command from the package.

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.

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

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

with Options

[Default Path]

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

[Route Parameters]

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

Using route() method

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

[with Parameters]

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

[with Default Path]

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

Using path() method

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

[with Default Path]

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

License

This package is licensed under the MIT License.

Copyright 2016 Sukohi Kuhoh

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固