Download the PHP package ctf0/tagos without Composer
On this page you can find all versions of the php package ctf0/tagos. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package tagos
Tagos
A Tag Editor and Selector based on spatie/laravel-tags.
Editor
Selector
- package requires Laravel v5.5+
Installation
-
composer require ctf0/tagos
-
publish the package assets with
php artisan vendor:publish --provider="ctf0\Tagos\TagosServiceProvider"
php artisan vendor:publish --provider="Spatie\Tags\TagsServiceProvider" --tag="migrations"
-
after installation, run
php artisan tagos:setup
to add- package routes to
routes/web.php
- package assets compiling to
webpack.mix.js
- package routes to
-
install dependencies
- add this one liner to your main js file and run
npm run watch
to compile yourjs/css
files.- if you are having issues Check
Features
- tags editor & selector.
- show tag suggestion as you type.
- easily add new tag name & type.
- show tagged items by tag & by type.
- search for tags by name in tags index.
-
shortcuts
interactions keyboard mouse (click) show all tags (input) 2x add new tag enter * hide tags list esc anywhere
Usage
-
migrate the tags table with
php artisan migrate
-
there is also a seeder to quickly get you going
- add
HasTags
trait to your model ex.post
Get All tags
Attaching Tags
-
show the tag selector
-
ex.
posts create view
- ex.
posts edit view
-
-
save the tags
-
store()
update()
-
Display Model Tags
Routes
Method | URL | Name | Action |
---|---|---|---|
GET | tags/editor | tagos.editor | \ctf0\Tagos\Controllers\TagosController@editor |
GET | tags | tagos.index | \ctf0\Tagos\Controllers\TagosController@index |
GET | tags/type/{type} | tagos.index_type | \ctf0\Tagos\Controllers\TagosController@indexByType |
GET | tags/{slug} | tagos.show | \ctf0\Tagos\Controllers\TagosController@show |
GET | tags/type/{type}/tag/{slug} | tagos.show_type | \ctf0\Tagos\Controllers\TagosController@showByType |
All versions of tagos with dependencies
spatie/laravel-tags Version *
ctf0/package-changelog Version *