All Projects → adumskis → Laravel Advert

adumskis / Laravel Advert

Licence: mit
Adverts management plugin for Laravel 5

Labels

Projects that are alternatives of or similar to Laravel Advert

Laravel Passport Vue Authentication
Laravel & Vue.js - authentication with Laravel Passport (Laravel 7 + Passport 9.3 + Vue 2.6 + Vuex 3.5)
Stars: ✭ 40 (-9.09%)
Mutual labels:  laravel
Builder
Prepare your Laravel apps incredibly fast, with various commands, services, facades and boilerplates.
Stars: ✭ 1,009 (+2193.18%)
Mutual labels:  laravel
Laravel
Muito conteúdo sobre o framework Laravel. Controllers, Models, Views, Blade, Migrations, Seeders, Middlewares, Autenticação, Autorização, Providers, pacotes, laravel 8, etc.
Stars: ✭ 43 (-2.27%)
Mutual labels:  laravel
Api.yike.io
一刻社区后端 API 源码
Stars: ✭ 1,004 (+2181.82%)
Mutual labels:  laravel
Vessel
Up and running with small Docker environments
Stars: ✭ 1,006 (+2186.36%)
Mutual labels:  laravel
Project Automation
Python script for creating new projects (React, Express.js, Vue, Laravel, etc.) in the desired local directory, with a GitHub origin.
Stars: ✭ 42 (-4.55%)
Mutual labels:  laravel
Freelancers Market
Laravel Project to help freelance websites clients and freelancers to find each other.
Stars: ✭ 39 (-11.36%)
Mutual labels:  laravel
Doctype admin
Laravel Admin Panel for lazy developers. Contains User Management, Roles and Permission Management, Activity Logging and integratable packages
Stars: ✭ 44 (+0%)
Mutual labels:  laravel
Freescout
FreeScout — Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)
Stars: ✭ 1,008 (+2190.91%)
Mutual labels:  laravel
Laravel Dropbox Driver
A storage extension for Dropbox.
Stars: ✭ 42 (-4.55%)
Mutual labels:  laravel
Laravel Mail View
Preview Laravel Mailables and notifications in your browser.
Stars: ✭ 41 (-6.82%)
Mutual labels:  laravel
Website
Source code to the Laravel Nigeria meetup website.
Stars: ✭ 41 (-6.82%)
Mutual labels:  laravel
Avbook
AV 电影管理系统, avmoo , javbus , javlibrary 爬虫,线上 AV 影片图书馆,AV 磁力链接数据库,Japanese Adult Video Library,Adult Video Magnet Links - Japanese Adult Video Database
Stars: ✭ 8,133 (+18384.09%)
Mutual labels:  laravel
Laravel Compass
A REST client inside your Laravel app
Stars: ✭ 1,002 (+2177.27%)
Mutual labels:  laravel
Russianpost Sdk
PHP SDK для Почты России
Stars: ✭ 43 (-2.27%)
Mutual labels:  laravel
Captchavel
Integrate reCAPTCHA into your Laravel app better than the Big G itself!
Stars: ✭ 40 (-9.09%)
Mutual labels:  laravel
Blade Zondicons
A package to easily make use of Zondicons in your Laravel Blade views.
Stars: ✭ 40 (-9.09%)
Mutual labels:  laravel
Laravel Notification
Example package for using the (still under development) Messages API from Nexmo as a notification channel in Laravel
Stars: ✭ 44 (+0%)
Mutual labels:  laravel
Amazon Ecs
With Laravel, search and lookup Amazon products easily.
Stars: ✭ 43 (-2.27%)
Mutual labels:  laravel
Start laravel
Let this application be your quick start to Laravel, It'll help you to build your app structure and show you each component of Laravel and how to best practice them.
Stars: ✭ 42 (-4.55%)
Mutual labels:  laravel

Laravel Advert

Simple package that helps add advert to Laravel 5 websites. What is more it allows to see every advert clicks and views count for some statistics.

Installation

First require package with composer:

$ composer require adumskis/laravel-advert dev-master

Then add service provider to config/app.php:

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider

'providers' => [
    ...
    Adumskis\LaravelAdvert\AdvertServiceProvider::class,
],

Facade to aliases:

'aliases' => [
    ...
    'AdvMng'    => Adumskis\LaravelAdvert\AdvertFacade::class,
],

Publish config:

$ php artisan vendor:publish --provider="Adumskis\LaravelAdvert\AdvertServiceProvider" --tag=config

Publish Advert view:

$ php artisan vendor:publish --provider="Adumskis\LaravelAdvert\AdvertServiceProvider" --tag=views

Lastly publish the migrations if you want to edit them and migrate

$ php artisan vendor:publish --provider="Adumskis\LaravelAdvert\AdvertServiceProvider" --tag=migrations
$ php artisan migrate

AdvertCategory model

Simple Eloquent model with variables:

  • type - (string) used for getting advert in specific category
  • width - (int) size in pixel to resize advert
  • height - (int) same as width

If width or height is set to 0 then advert image will be resized with [aspectRatio][1] method.

Advert model

Eloquent model, variables:

  • alt - (string) alt parameter tag
  • url - (string) url address where advert should redirect on click
  • image_url - (string) url addres of advert image
  • image_path - (string) path to image (from base path)
  • views - (int) count of views
  • clicks - (int) count of clicks
  • active - (bool) advert state
  • advert_category_id - (int) advert category model id
  • viewed_at - (timestamp) datetime of last advert view

Advert model has make method that helps to create new record in database also handles image resize and storing stuff. Method requires array with advert variables values and UploadedFile object. Simple example:

Advert::make(
    $request->only(['alt', 'url', 'active']), 
    $request->file('image')
);

It will return Advert object

Usage in view

    {{ AdvMng::getHTML('type') }}

It will take the that with lowest viewed_at parameter. getHTML method allow add second (bool) parameter and if it's true then it will not check if advert was already taken.

    {{ AdvMng::getHTML('type', true) }}

Advert image storage

    'default_file_system' => 'public',

To use the inbuilt ability of laravels multiple filesystems change this to another public facing service provider such as s3.

ToDo/Ideas

  • Add limit to advert views/clicks
  • Advert Campaigns
  • Advert Cost per click and cost per view?
  • Video Adverts.
  • Time of day adverts
  • Multiple adverts per campaign
  • Multiple images / videos per advert.
  • Follow Ad galley guide and create different size ads for different regions of the page.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].