Geocodio / geocodio-library-php

geocod.io PHP library
MIT License
101 stars 9 forks source link

Using Laravel 7.x and publisher is not available #2

Closed brantmessenger closed 4 years ago

brantmessenger commented 4 years ago

composer.json "require": { "php": "^7.2.5", "authy/php": "^3.0", "doctrine/dbal": "^2.10", "fideloper/proxy": "^4.2", "fruitcake/laravel-cors": "^1.0", "geocodio/geocodio-library-php": "^1.1", "guzzlehttp/guzzle": "^6.3", "laravel/framework": "^7.0", "laravel/tinker": "^2.0", "laravel/ui": "^2.0" },

C:__\Workspaces\JetBrains\local_mwa_trunk>php artisan vendor:publish

Which provider or tag's files would you like to publish?: [0 ] Publish files from all providers and tags listed below [1 ] Provider: Facade\Ignition\IgnitionServiceProvider [2 ] Provider: Fideloper\Proxy\TrustedProxyServiceProvider [3 ] Provider: Fruitcake\Cors\CorsServiceProvider [4 ] Provider: Illuminate\Foundation\Providers\FoundationServiceProvider [5 ] Provider: Illuminate\Mail\MailServiceProvider [6 ] Provider: Illuminate\Notifications\NotificationServiceProvider [7 ] Provider: Illuminate\Pagination\PaginationServiceProvider [8 ] Provider: Laravel\Tinker\TinkerServiceProvider [9 ] Tag: cors [10] Tag: flare-config [11] Tag: ignition-config [12] Tag: laravel-errors [13] Tag: laravel-mail [14] Tag: laravel-notifications [15] Tag: laravel-pagination

Any help with this would be greatly appreciated. Short term mitigation I will use the sample of the config provided in repository.

Thanks, Brant

MiniCodeMonkey commented 4 years ago

Hi there,

I am not quite sure why you are not seeing the library in the list. Can you please try to publish the config file explicitly?

php artisan vendor:publish --provider="Geocodio\GeocodioServiceProvider"

This is what I see with a fresh new Laravel 7 installation with this library added

$ laravel new blabla
$ cd blabla
$ composer require geocodio/geocodio-library-php
$ ls config/geocodio.php
ls: config/geocodio.php: No such file or directory
$ php artisan vendor:publish --provider="Geocodio\GeocodioServiceProvider"
Copied File [/vendor/geocodio/geocodio-library-php/config/geocodio.php] To [/config/geocodio.php]
Publishing complete.
$ ls config/geocodio.php 
config/geocodio.php
$ php artisan vendor:publish                                              

 Which provider or tag's files would you like to publish?:
  [0 ] Publish files from all providers and tags listed below
  [1 ] Provider: Facade\Ignition\IgnitionServiceProvider
  [2 ] Provider: Fideloper\Proxy\TrustedProxyServiceProvider
  [3 ] Provider: Fruitcake\Cors\CorsServiceProvider
  [4 ] Provider: Geocodio\GeocodioServiceProvider
  [5 ] Provider: Illuminate\Foundation\Providers\FoundationServiceProvider
  [6 ] Provider: Illuminate\Mail\MailServiceProvider
  [7 ] Provider: Illuminate\Notifications\NotificationServiceProvider
  [8 ] Provider: Illuminate\Pagination\PaginationServiceProvider
  [9 ] Provider: Laravel\Tinker\TinkerServiceProvider
  [10] Tag: cors
  [11] Tag: flare-config
  [12] Tag: ignition-config
  [13] Tag: laravel-errors
  [14] Tag: laravel-mail
  [15] Tag: laravel-notifications
  [16] Tag: laravel-pagination
brantmessenger commented 4 years ago

Thanks for your response. One note, I am running from my PC (windows 10).

I've tried as you ask and here are my results...

C:\__\Workspaces\JetBrains\local_mwa_trunk>php artisan vendor:publish --provider="Geocodio\GeocodioServiceProvider"
Unable to locate publishable resources.
Publishing complete.

When I go to the configs path geocodio.php file does not exist.

brantmessenger commented 4 years ago

Went into the vendor package and copied the config.