承接 sukohi/postern 相关项目开发

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

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

sukohi/postern

最新稳定版本:2.0.5

Composer 安装命令:

composer require sukohi/postern

包简介

PHP class that mainly developed for Laravel to sign in to user page easily in development environment.

README 文档

README

PHP class that mainly developed for Laravel to sign in to user page easily in development environment.
(This is for Laravel 5+. For Laravel 4.2)

Installation

Execute composer command.

composer require sukohi/postern:2.*

If your Laravel's version is 5.5+, the installation is done!

Register the service provider in app.php

'providers' => [
    ...Others...,  
    Sukohi\Postern\PosternServiceProvider::class,
]

Also alias

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

Usage

Minimal Way (in View)

<form method="POST" action="http://example.com" name="form_name">
    <input name="input_email_name" type="text">
    <input name="input_password_name" type="password">
</form>

{!! \Postern::form('form_name')
        ->credentials('Link Text', ['input_email_name' => 'admin@example.com', 'input_password_name' => 'admin'])
        ->render()
!!}

Other Way (in View)

{!! \Postern::form('form_name')
        ->credentials('Admin Login', ['email' => 'admin@example.com', 'password' => 'admin'])
        ->credentials('User Login', ['email' => 'user@example.com', 'password' => 'user'])
        ->localOnly($boolean = true)    // optional
        ->render()
!!}
  • You can repeatedly use credentials().
  • If you'd like to use this package in production environment, set localOnly(false).

License

This package is licensed under the MIT License.

Copyright 2015 Sukohi Kuhoh

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-10