Skip to content

Commit c0c5245

Browse files
author
Kulkarni
committed
Basic Package Setup done
0 parents  commit c0c5245

16 files changed

+667
-0
lines changed

composer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "sachingk/kvpair",
3+
"description": "KV Pair System For Laravel",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Sachin G Kulkarni",
8+
"email": "sachingk.30@gmail.com"
9+
}
10+
],
11+
"minimum-stability": "stable",
12+
"require": {}
13+
}

src/Config/kvpair.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
4+
return [
5+
'dropdown_select_string' => 'Select...'
6+
];

src/Facade/kvpair.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
4+
namespace sachingk\kvpair\Facade;
5+
6+
use Illuminate\Support\Facades\Facade;
7+
8+
class kvpair extends Facade
9+
{
10+
11+
protected static function getFacadeAccessor() { return 'kvpair'; }
12+
13+
}

src/KVPairServiceProvider.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
namespace sachingk\kvpair;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class KVPairServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Bootstrap the application services.
11+
*
12+
* @return void
13+
*/
14+
public function boot()
15+
{
16+
$this->loadTranslationsFrom( __DIR__.'/Lang', 'kvpair');
17+
18+
$this->publishes([
19+
__DIR__.'/Config/kvpair.php' => config_path('kvpair.php'),
20+
], 'config');
21+
}
22+
23+
/**
24+
* Register the application services.
25+
*
26+
* @return void
27+
*/
28+
public function register()
29+
{
30+
// include __DIR__.'/routes.php';
31+
32+
33+
$this->mergeConfigFrom( __DIR__.'/Config/kvpair.php', 'kvpair');
34+
35+
36+
37+
$this->app->singleton('kvpair', function ($app) {
38+
return new kvpair();
39+
});
40+
41+
}
42+
}

src/Lang/en/langTrans.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
"select"=>"Select..."
5+
];

src/Lang/kn/langTrans.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
"select"=>"Aikaya Madi"
5+
];

src/kvpair.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace sachingk\kvpair;
4+
5+
class kvpair
6+
{
7+
8+
public static function saySomething() {
9+
// return 'Hello World!';
10+
11+
//return config('kvpair.dropdown_select_string');
12+
13+
return trans('kvpair::langTrans.select');
14+
}
15+
16+
}

src/routes.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
Route::get('kvpair', function(){
3+
echo 'Testing it!';
4+
});

vendor/autoload.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
// autoload.php @generated by Composer
4+
5+
require_once __DIR__ . '/composer/autoload_real.php';
6+
7+
return ComposerAutoloaderInit4fbc4b445e78a09e9c12cb9c8c878b02::getLoader();

0 commit comments

Comments
 (0)