generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: First commit, accommodating the project structure
- Loading branch information
Emilio Puljiz
committed
Mar 20, 2024
1 parent
3613bb6
commit 81bd88f
Showing
17 changed files
with
288 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,42 @@ | ||
{ | ||
"name": ":vendor_slug/:package_slug", | ||
"description": ":package_description", | ||
"name": "emiliopuljiz/api-whatsapp-business", | ||
"description": "With this package you can create WhatsApp Business templates, start conversations through these templates. We are also going to have a panel to be able to receive and send messages with clients that we start conversations with.", | ||
"keywords": [ | ||
":vendor_name", | ||
"emiliopuljiz", | ||
"laravel", | ||
":package_slug" | ||
"api-whatsapp-business" | ||
], | ||
"homepage": "https://github.com/:vendor_slug/:package_slug", | ||
"homepage": "https://github.com/EmilioPuljiz/api-whatsapp-business", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": ":author_name", | ||
"email": "[email protected]", | ||
"role": "Developer" | ||
"name": "Emilio Puljiz", | ||
"email": "[email protected]", | ||
"homepage": "http://www.vidadigital.com.ar", | ||
"role": "CEO & CTO" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.2", | ||
"php": "^8.2|^8.2", | ||
"spatie/laravel-package-tools": "^1.16", | ||
"illuminate/contracts": "^10.0||^11.0" | ||
}, | ||
"require-dev": { | ||
"laravel/pint": "^1.14", | ||
"nunomaduro/collision": "^8.1.1||^7.10.0", | ||
"larastan/larastan": "^2.9", | ||
"orchestra/testbench": "^9.0.0||^8.22.0", | ||
"pestphp/pest": "^2.34", | ||
"pestphp/pest-plugin-arch": "^2.7", | ||
"pestphp/pest-plugin-laravel": "^2.3", | ||
"phpstan/extension-installer": "^1.3", | ||
"phpstan/phpstan-deprecation-rules": "^1.1", | ||
"phpstan/phpstan-phpunit": "^1.3", | ||
"spatie/laravel-ray": "^1.35" | ||
"illuminate/support": "^10.0||^11.0", | ||
"illuminate/contracts": "^10.0||^11.0", | ||
"illuminate/database": "^10.0||^11.0", | ||
"illuminate/container": "^10.0||^11.0", | ||
"illuminate/auth": "^10.0||^11.0" | ||
}, | ||
"require-dev": {}, | ||
"autoload": { | ||
"psr-4": { | ||
"VendorName\\Skeleton\\": "src/", | ||
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories/" | ||
"EmilioPuljiz\\ApiWhatsappBusiness\\": "src/", | ||
"EmilioPuljiz\\ApiWhatsappBusiness\\Database\\Factories\\": "database/factories/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"VendorName\\Skeleton\\Tests\\": "tests/", | ||
"Workbench\\App\\": "workbench/app/" | ||
"EmilioPuljiz\\ApiWhatsappBusiness\\Tests\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"post-autoload-dump": "@composer run prepare", | ||
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi", | ||
"prepare": "@php vendor/bin/testbench package:discover --ansi", | ||
"build": [ | ||
"@composer run prepare", | ||
"@php vendor/bin/testbench workbench:build --ansi" | ||
], | ||
"start": [ | ||
"Composer\\Config::disableProcessTimeout", | ||
"@composer run build", | ||
"@php vendor/bin/testbench serve" | ||
], | ||
"analyse": "vendor/bin/phpstan analyse", | ||
"test": "vendor/bin/pest", | ||
"test-coverage": "vendor/bin/pest --coverage", | ||
"format": "vendor/bin/pint" | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
|
@@ -73,10 +47,10 @@ | |
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"VendorName\\Skeleton\\SkeletonServiceProvider" | ||
"EmilioPuljiz\\ApiWhatsappBusiness\\ApiWhatsappBusinessServiceProvider" | ||
], | ||
"aliases": { | ||
"Skeleton": "VendorName\\Skeleton\\Facades\\Skeleton" | ||
"ApiWhatsappBusiness": "EmilioPuljiz\\ApiWhatsappBusiness\\Facades\\ApiWhatsappBusiness" | ||
} | ||
} | ||
}, | ||
|
42 changes: 42 additions & 0 deletions
42
database/migrations/2023_04_21_110851_create_whatsapp_configurations_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateWhatsappConfigurationsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('whatsapp_configurations', function (Blueprint $table) { | ||
$table->id(); | ||
|
||
$table->string('client_id'); | ||
$table->string('client_secret'); | ||
$table->text('access_token'); | ||
$table->dateTime('expires_in'); | ||
$table->string('phone_number_id'); | ||
|
||
$table->unsignedBigInteger('configuration_id'); | ||
$table->foreign('configuration_id')->references('id')->on('configurations'); | ||
|
||
$table->softDeletes(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('whatsapp_configurations'); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
database/migrations/2024_03_04_161027_create_whatsapp_notification_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateWhatsappNotificationsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('whatsapp_notifications', function (Blueprint $table) { | ||
$table->id(); | ||
$table->text('title')->nullable(); | ||
$table->text('description')->nullable(); | ||
$table->string('template'); | ||
$table->boolean('is_active'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('whatsapp_notification'); | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace EmilioPuljiz\ApiWhatsappBusiness; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
|
||
class ApiWhatsappBusinessServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Bootstrap any package services. | ||
*/ | ||
public function boot(): void | ||
{ | ||
if (!class_exists('CreateWhatsappConfigurationsTable')) { | ||
$this->publishes([ | ||
__DIR__ . '/../database/migrations/2023_04_21_110851_create_whatsapp_configurations_table.php' => database_path('migrations/' . date('Y_m_d_His', time()) . 'create_whatsapp_configurations_table.php'), | ||
]); | ||
} | ||
|
||
if (!class_exists('CreateWhatsappNotificationsTable')) { | ||
$this->publishes([ | ||
__DIR__ . '/../database/migrations/2024_03_04_161027_create_whatsapp_notification_table.php' => database_path('migrations/' . date('Y_m_d_His', time()) . 'create_whatsapp_notification_table.php'), | ||
]); | ||
} | ||
|
||
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations/', 'migrations'); | ||
} | ||
|
||
/** | ||
* Register any application services. | ||
*/ | ||
public function register(): void | ||
{ | ||
$this->mergeConfigFrom( | ||
__DIR__ . '/../config/courier.php', | ||
'courier' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace EmilioPuljiz\ApiWhatsappBusiness\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class WhatsappConfiguration extends Model | ||
{ | ||
use HasFactory; | ||
|
||
protected $table = "whatsapp_configurations"; | ||
|
||
protected $fillable = [ | ||
'id', | ||
'client_id', | ||
'client_secret', | ||
'access_token', | ||
'expires_in', | ||
'phone_number_id', | ||
'configuration_id', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace EmilioPuljiz\ApiWhatsappBusiness\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class WhatsappNotification extends Model | ||
{ | ||
use HasFactory; | ||
|
||
protected $table = "whatsapp_notifications"; | ||
|
||
protected $fillable = [ | ||
'id', | ||
'template', | ||
'title', | ||
'description', | ||
'is_active' | ||
]; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.