Skip to content

Commit 976cc2a

Browse files
committed
First commit
0 parents  commit 976cc2a

File tree

120 files changed

+7239
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+7239
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
SDK Consultoría Base
2+
====
3+
4+
5+
Instalación
6+
------------
7+
EL mejor modo de instalar esta extencion es por medio de composer.
8+
9+
Ejecuta el comando
10+
11+
```
12+
composer require --prefer-dist capmega/base "*"
13+
```
14+
15+
o añade la linea
16+
17+
```
18+
"capmega/base": "*"
19+
```
20+
21+
En la sección require de tu archivo `composer.json`.

composer.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "capmega/base",
3+
"type": "library",
4+
"description": "Funciones basicas y auxiliares",
5+
"keywords": ["laravel", "package", "base"],
6+
"license": "MIT",
7+
"authors": [
8+
{
9+
"name": "Camilo Rodriguez Cruz",
10+
"email": "[email protected]",
11+
"homepage": "https://capmega.com",
12+
"role": "Developer"
13+
}
14+
],
15+
"require": {
16+
"php": ">=7.2",
17+
"capmega/blog": "*",
18+
"spatie/laravel-permission": "^3.2",
19+
"intervention/image": "^2.5",
20+
"twilio/sdk": "^5.34",
21+
"hybridauth/hybridauth" : "~3.0",
22+
"maatwebsite/excel": "^3.1"
23+
},
24+
"require-dev": {
25+
26+
},
27+
"autoload": {
28+
"files": [
29+
30+
],
31+
"psr-4": {
32+
"Capmega\\Base\\": "src/"
33+
}
34+
},
35+
"extra": {
36+
"laravel": {
37+
"providers": [
38+
"Capmega\\Base\\BaseServiceProvider"
39+
],
40+
"aliases": {
41+
"Debugbar": "Capmega\\Base\\Facade"
42+
}
43+
}
44+
}
45+
}

config/base.php

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
<?php
3+
return [
4+
/*
5+
|--------------------------------------------------------------------------
6+
| Configuracion basica
7+
|--------------------------------------------------------------------------
8+
|
9+
|
10+
*/
11+
'version' => '0.1',
12+
'languages' => [
13+
'es' => 'Español',
14+
'en' => 'Ingles',
15+
],
16+
'images' => [
17+
[
18+
'name' => 'thumbnail',
19+
'height' => '100',
20+
'width' => '100',
21+
'quality' => 90,
22+
],
23+
[
24+
'name' => 'small',
25+
'height' => '185',
26+
'width' => '185',
27+
'quality' => 90,
28+
],
29+
[
30+
'name' => 'medium',
31+
'height' => '358',
32+
'width' => '358',
33+
'quality' => 90,
34+
],
35+
[
36+
'name' => 'large',
37+
'height' => '1000',
38+
'width' => '1000',
39+
'quality' => 90,
40+
],
41+
],
42+
'images_types' => [
43+
'og-image',
44+
'cover',
45+
'main',
46+
'other',
47+
],
48+
'pagination' => [5, 10, 20, 40, 80, 100],
49+
'hybridauth' => [
50+
'facebook' => [
51+
'enabled' => true,
52+
'callback' => env('APP_URL').'/social-auth/facebook',
53+
'keys' => [ 'key' => env('FACEBOOK_KEY'), 'secret' => env('FACEBOOK_SECRET') ]
54+
],
55+
'twitter' => [
56+
'enabled' => true,
57+
'callback' => env('APP_URL').'/social-auth/twitter',
58+
'keys' => [ 'key' => env('TWITTER_KEY'), 'secret' => env('TWITTER_SECRET') ]
59+
],
60+
'google' => [
61+
'enabled' => true,
62+
'callback' => env('APP_URL').'/social-auth/google',
63+
'keys' => [ 'key' => env('GOOGLE_KEY'), 'secret' => env('GOOGLE_SECRET') ]
64+
]
65+
],
66+
'sync' => [
67+
'server' => env('SYNC_SERVER', ''),
68+
'username' => env('SYNC_USERNAME', ''),
69+
'port' => env('SYNC_PORT', ''),
70+
'path' => env('SYNC_PATH', ''),
71+
'sync_folders' => [
72+
'storage/app/public/',
73+
]
74+
],
75+
'menu' => [
76+
'\Capmega\Blog\Helpers\Menu',
77+
'\Capmega\Base\Helpers\Menu',
78+
],
79+
'search' => [
80+
'default' => false
81+
],
82+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateCountriesTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('countries', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->timestamps();
19+
$table->smallInteger('status')->default('15');
20+
$table->unsignedBigInteger('created_by')->unsigned()->index()->nullable();
21+
$table->foreign('created_by')->references('id')->on('users')->onDelete('restrict');
22+
$table->unsignedBigInteger('updated_by')->unsigned()->index()->nullable();
23+
$table->foreign('updated_by')->references('id')->on('users')->onDelete('restrict');
24+
25+
$table->string('country_code');
26+
$table->string('country_name');
27+
});
28+
}
29+
30+
/**
31+
* Reverse the migrations.
32+
*
33+
* @return void
34+
*/
35+
public function down()
36+
{
37+
Schema::dropIfExists('countries');
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateBanksTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('banks', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->timestamps();
19+
$table->commonFields();
20+
21+
$table->string('name')->nullable();
22+
$table->string('seoname')->nullable();
23+
$table->string('short_name')->nullable();
24+
$table->string('code')->nullable();
25+
});
26+
}
27+
28+
/**
29+
* Reverse the migrations.
30+
*
31+
* @return void
32+
*/
33+
public function down()
34+
{
35+
Schema::dropIfExists('banks');
36+
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateImageTypesTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('image_types', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->timestamps();
19+
$table->commonFields();
20+
21+
$table->string('name')->nullable();
22+
$table->string('seoname')->nullable();
23+
$table->text('sizes')->nullable();
24+
});
25+
}
26+
27+
/**
28+
* Reverse the migrations.
29+
*
30+
* @return void
31+
*/
32+
public function down()
33+
{
34+
Schema::dropIfExists('image_types');
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateImagesTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('images', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->timestamps();
19+
$table->commonFields();
20+
21+
$table->unsignedBigInteger('image_types_id')->unsigned()->index()->nullable();
22+
$table->foreign('image_types_id')->references('id')->on('image_types')->onDelete('restrict');
23+
$table->string('route')->nullable();
24+
$table->string('name')->nullable();
25+
$table->string('seoname')->nullable();
26+
$table->string('extension', 6)->nullable();
27+
$table->string('alt', 124)->nullable();
28+
$table->text('sizes')->nullable();
29+
});
30+
}
31+
32+
/**
33+
* Reverse the migrations.
34+
*
35+
* @return void
36+
*/
37+
public function down()
38+
{
39+
Schema::dropIfExists('images');
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateCdnsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('cdns', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->timestamps();
19+
$table->commonFields();
20+
21+
$table->enum('type', ['LOCAL', 'TRIAL', 'PRODUCTION']);
22+
$table->string('domain');
23+
$table->string('api_key')->nullable();
24+
});
25+
}
26+
27+
/**
28+
* Reverse the migrations.
29+
*
30+
* @return void
31+
*/
32+
public function down()
33+
{
34+
Schema::dropIfExists('cdns');
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateSubscriptionsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('subscriptions', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->timestamps();
19+
$table->smallInteger('status')->default('15');
20+
$table->string('email')->nullable();
21+
});
22+
}
23+
24+
/**
25+
* Reverse the migrations.
26+
*
27+
* @return void
28+
*/
29+
public function down()
30+
{
31+
Schema::dropIfExists('subscriptions');
32+
}
33+
}

0 commit comments

Comments
 (0)