Skip to content

Commit 3b0f6ec

Browse files
committed
rename to laravel google bard
1 parent 72e8ab3 commit 3b0f6ec

File tree

7 files changed

+38
-38
lines changed

7 files changed

+38
-38
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# laravel-bard
1+
# laravel-google-bard
22
A Laravel Package for Google Bard AI Chatbot
33

44

55
## INSTALATION
6-
- `composer require adityadees/laravel-bard`
7-
- `php artisan vendor:publish --tag=laravel-lighthouse`
8-
- New file `laravel-bard.php` will created under `config` folder
6+
- `composer require adityadees/laravel-google-bard`
7+
- `php artisan vendor:publish --tag=laravel-google-bard`
8+
- New file `laravel-google-bard.php` will created under `config` folder
99
- Fill the `bard_token` with your token
1010

1111

@@ -14,12 +14,12 @@ Visit https://bard.google.com/
1414
Go to Developer tools or press F12
1515
Application → Cookies → Copy the value of __Secure-1PSID cookie.
1616

17-
<img width="864" alt="image" src="https://github.com/adityadees/laravel-bard/assets/37553901/2cea58d3-0c74-464d-9f75-88ab68f213e6">
17+
<img width="864" alt="image" src="https://github.com/adityadees/laravel-google-bard/assets/37553901/2cea58d3-0c74-464d-9f75-88ab68f213e6">
1818

1919

2020
## RUN
2121
```php
22-
$bard = (new LaravelBard())->get_answer('type_your_text_here');
22+
$bard = (new LaravelGoogleBard())->get_answer('type_your_text_here');
2323

2424
# to get the reply just access this array
2525
$bard["content"];

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "adityadees/laravel-bard",
2+
"name": "adityadees/laravel-google-bard",
33
"description": "A Laravel Package for Google Bard AI Chatbot",
44
"keyword": [
55
"google-bard",
@@ -13,7 +13,7 @@
1313
"license": "MIT",
1414
"autoload": {
1515
"psr-4": {
16-
"AdityaDees\\LaravelBard\\": "src/"
16+
"AdityaDees\\LaravelGoogleBard\\": "src/"
1717
}
1818
},
1919
"authors": [
@@ -25,7 +25,7 @@
2525
"extra": {
2626
"laravel": {
2727
"providers": [
28-
"AdityaDees\\LaravelBard\\LaravelBardServiceProvider"
28+
"AdityaDees\\LaravelGoogleBard\\LaravelGoogleBardServiceProvider"
2929
]
3030
}
3131
},

config/laravel-bard.php renamed to config/laravel-google-bard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
return [
44
/*
55
|--------------------------------------------------------------------------
6-
| BARD_API
6+
| BARD TOKEN
77
|--------------------------------------------------------------------------
88
|
99
| Using `__Secure-1PSID` inside

src/Exceptions/ErrorException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace AdityaDees\LaravelBard\Exceptions;
5+
namespace AdityaDees\LaravelGoogleBard\Exceptions;
66

77
use Exception;
88

src/LaravelBardServiceProvider.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/LaravelBard.php renamed to src/LaravelGoogleBard.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
declare(strict_types=1);
44

5-
namespace AdityaDees\LaravelBard;
5+
namespace AdityaDees\LaravelGoogleBard;
66

7-
use AdityaDees\LaravelBard\Exceptions\ErrorException;
7+
use AdityaDees\LaravelGoogleBard\Exceptions\ErrorException;
88

99
/**
10-
* LaravelBard
10+
* LaravelGoogleBard
1111
*
1212
* @author Aditya Dharmawan Saputra @adityadees
1313
*
1414
*/
1515

16-
class LaravelBard
16+
class LaravelGoogleBard
1717
{
1818
private $proxies;
1919
private $timeout;
@@ -29,7 +29,7 @@ public function __construct($timeout = 6, $proxies = null, $session = null)
2929
{
3030
$this->proxies = $proxies;
3131
$this->timeout = $timeout;
32-
$this->token = config('laravel-bard.bard_token');
32+
$this->token = config('laravel-google-bard.bard_token');
3333
$headers = [
3434
"Host: bard.google.com",
3535
"X-Same-Domain: 1",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AdityaDees\LaravelGoogleBard;
6+
7+
use Illuminate\Support\ServiceProvider;
8+
9+
class LaravelGoogleBardServiceProvider extends ServiceProvider
10+
{
11+
public function boot(): void
12+
{
13+
$this->publishes([
14+
__DIR__ . '/../config/laravel-google-bard.php' => config_path('laravel-google-bard.php'),
15+
], 'laravel-google-bard');
16+
}
17+
18+
public function register(): void
19+
{
20+
$this->mergeConfigFrom(__DIR__ . '/../config/laravel-google-bard.php', 'laravel-google-bard');
21+
}
22+
}

0 commit comments

Comments
 (0)