Download the PHP package crypto-technology/laravel-adsense without Composer

On this page you can find all versions of the php package crypto-technology/laravel-adsense. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-adsense

Google Adsense Ads for Laravel 6.0+

Latest Version Total Downloads Build Status StyleCI Scrutinizer Code Coverage

Package for easily including Google Adsense Ad units in Laravel 6.0+ and Lumen. For use it with Laravel 5.x use original Mastergalen/Adsense-Ads package.

Installation

1 - Dependency

In your project root run

The first step is using Composer to install the package and automatically update your composer.json file, you can do this by running:

Note: If you are using Laravel 5.5+, the steps 3 and 4, for providers and aliases, are unnecessaries. Google Adsense Ads supports Laravel new Package Discovery.

2 - Set up config file

Run php artisan config:publish crypto-technology/laravel-adsense.

Edit the generated config file in /config/adsense-ads.php to add your ad units

3 - Register the provider with Laravel

You need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your config/app.php file adding the following code at the end of your 'providers' section:

config/app.php

Lumen

Go to bootstrap/app.php file and add this line:

4 - Register the alias with Laravel

Note: facades are not supported in Lumen.

You may get access to the Google Adsense Ads services using following facades:

You can setup a short-version aliases for these facades in your config/app.php file. For example:

5 - Configuration

Publish config

In your terminal type

or

Lumen does not support this command, for it you should copy the file src/resources/config/adsense-ads.php to config/adsense-ads.php of your project.

In adsense-ads.php configuration file you can determine the properties of the default values and some behaviors.

Usage

Add {!! Adsense::javascript() !!} in your <head> tag.

To show ads, add {!! Adsense::ads('ads_unit') !!}, where ads_unit is one of your ads units in your config file (for example {!! Adsense::ads('responsive') !!}).

Use {!! Adsense::ads('ads_unit') !!} every time you want to show an ad.

Changelog

Please see the CHANGELOG.md file for more information on what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The Google Adsense Ads is open-sourced software licensed under the MIT license.
Please see the LICENSE.md file for more information.


All versions of laravel-adsense with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
illuminate/view Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package crypto-technology/laravel-adsense contains the following files

Loading the files please wait ....