tyondo / aggregator
A simple blog package
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Language:HTML
Requires
- php: >=5.6.4
- doctrine/dbal: ^2.5
- illuminate/support: 5.3.*|5.4.*|5.5.*
- intervention/image: ^2.4
- laravelcollective/html: 5.3.1|5.4.1
- maatwebsite/excel: ^2.1
- unisharp/laravel-filemanager: ^1.8
Requires (Dev)
- phpunit/phpunit: ~4.5
Suggests
- tyondo/mnara: User management package with ACL for managing Users / Roles / Permissions in Laravel 5.3 and 5.4.
This package is not auto-updated.
Last update: 2024-10-27 05:04:27 UTC
README
##Production ready but still under ACTIVE development:
This is a blog package for laravel. Most of the packages available tend to force the user to use an administration panel or have them as the base package.
This package is meant to be dropped into an existing app to provide blogging functionality with media management capability.
#Installation
The package can be used from laravel 5.3 and above. To install:
Run:
composer require tyondo/aggregator
in the config/app.php add:
Tyondo\Aggregator\TyondoAggregatorServiceProvider::class,
If you are a developer, you can contribute and extend by cloning it in: packages/tyondo folder and then in your composer.json file add:
"Tyondo\\Aggregator\\": "packages/tyondo/aggregator/src/"
and then require the extra packages used by aggregator:
"laravelcollective/html": "5.3.1|5.4.1",
"unisharp/laravel-filemanager": "^1.8",
"intervention/image": "^2.4",
After either of the above steps. Run
php artisan aggregator:install
This will install the package fully
#Features
- Create different post types (standard, video, audio)
- Use of Tags
- Use of categories
- Generation of youtube video thumbnails
- Media manager for managing images, audios and videos
- Integrated media manager in the text editor (ckeditor used)
- Image resizing
#Pending features
- Parametrizing the image resizing funtionality
- Building blog API end points.
- Blog settings
- Blog user profile
- Blog contributors
#Usage ###Accessing posts There are several ways that you can retrive posts stored by the aggregator
- All posts
$posts = \Tyondo\Aggregator\Models\Post::all()
- Posts based on their type (published, draft, review, inactive)
$posts = \Tyondo\Aggregator\Models\Post::where('post_status','published')->get()
####Post return fields and method When you retrieve a given post you will have access to the following parameters and methods
- id
- title
- slug
- subtitle
- body
- summary
- meta_description
- post_type
- featured_content
- is_published
- user_id
- post_status
- category_id
- featured_image
- view_count
- key_words
- created_at
- updated_at
- category()
- tags()
- user()
###Using on a blog
- How to access post author
{{ucfirst($post->user->name)}}
- How to access post category
{{$post->category->category}}
- How to access post created time in human language
{{$post->created_at->diffForHumans()}}
- How to access youtube thumbnail from featured content
{{Aggregator::youtubeVideo($post->featured_content)}}
- How to get youtube iframe source link
{{Aggregator::youtubeVideo($post->featured_content, true)}}
- How to access day when the post was created
{{ $post->created_at->format('d')}}
- How to access month when post was created
{{$post->created_at->format('M')}}
- How to access post featured image
{{$post->featured_image}}
- How to add post links
{{route('your.post.route', $post->slug)}}
- How to list tags
@if(isset($tags)) @foreach($tags as $tag) <li><a href="{{route('your.tag.route', $tag->tag)}}">{{$tag->title}}</a></li> @endforeach @endif
- How to list categories
- How to access post tags
<a href="{{$tag['id']}}">{{$tag['title']}}</a>
@endforeach