2017 © Pedro Peláez
 

library form-autocomplete

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

image

sukohi/form-autocomplete

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

  • Thursday, July 7, 2016
  • by Sukohi
  • Repository
  • 1 Watchers
  • 1 Stars
  • 679 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

FormAutocomplete

A PHP package mainly developed for Laravel to generate javascript tag for auto-complete through jQuery UI.
(This is for Laravel 5+. For Laravel 4.2), (*1)

Installation

Add this package name in composer.json, (*2)

"require": {
  "sukohi/form-autocomplete": "2.*"
}

Execute composer command., (*3)

composer update

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

'providers' => [
    ...Others...,  
    Sukohi\FormAutocomplete\FormAutocompleteServiceProvider::class,
]

Also alias, (*5)

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

Requirement

Usage

(in View), (*6)

<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>

<!-- jQuery UI -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

<!-- Input -->
<input id="title_1" type="text">
<input id="title_2" type="text">
<input id="title_3" type="text">

<script>

    $(document).ready(function(){

        // Using Array

        {!! FormAutocomplete::selector('#title_1')->source(['aaaaa', 'bbbbb', 'cccccc']) !!}

        // Using Closure

        {!! FormAutocomplete::selector('#title_2')->source(function(){

            return \Item::where('id', '>', 2)->lists('title');  // You need to return array values.

        }) !!}

        // Using Table and column

        {!! FormAutocomplete::selector('#title_3')->db('items', 'title') !!}

    });

</script>

License

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

Copyright 2015 Sukohi Kuhoh, (*8)

The Versions

07/07 2016

1.0.x-dev

1.0.9999999.9999999-dev

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

07/07 2016

1.0.1

1.0.1.0

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

31/08 2015

2.0.x-dev

2.0.9999999.9999999-dev

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

31/08 2015

dev-master

9999999-dev

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

31/08 2015

2.0.0

2.0.0.0

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

31/08 2015

1.0.0

1.0.0.0

A PHP package mainly developed for Laravel to generate form input tags of Bootstrap that can automatically display errors, labels and alerts.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi