rabol/laravel-adsense 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rabol/laravel-adsense

最新稳定版本:v1.0.3

Composer 安装命令:

composer require rabol/laravel-adsense

包简介

Display Adsense ads in your Laravel app.

README 文档

README

Package for including Adsense Ads in Laravel 5, 6, 7, 8, 9, 10, 11

Installation

In your project root run

composer require rabol/laravel-adsense 

Set up config file

Run php artisan vendor:publish.

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

return [ 'client_id' => 'YOUR_CLIENT_ID', //Your Adsense client ID e.g. ca-pub-9508939161510421 'ads' => [ 'responsive' => [ 'ad_unit_id' => 12345678901, 'ad_format' => 'auto' 'ad_full_width_responsive' => true ], 'rectangle' => [ 'ad_unit_id' => 1234567890, 'ad_style' => 'display:inline-block;width:300px;height:250px', 'ad_format' => 'auto' ] ] ];

Register the package with Laravel

This package is for Laravel 5.5+ so it takes advantage of auto discover, so no manual configuration is needed

Usage

To show ads in your blade templates simply use {!! Adsense::show('responsive') !!} , for example.

统计信息

  • 总下载量: 6.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固