-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving of plugin from main repo to here
- Loading branch information
Nabeel Shahzad
committed
Feb 28, 2020
1 parent
bd67f3c
commit 945a28f
Showing
22 changed files
with
636 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
_ide_helper.php | ||
.php_cs.cache | ||
.phpstorm.meta.php | ||
.phpunit.result.cache | ||
/vendor | ||
node_modules/ | ||
npm-debug.log | ||
composer.phar | ||
yarn-error.log | ||
*.bak | ||
|
||
# Laravel 4 specific | ||
bootstrap/compiled.php | ||
app/storage/ | ||
|
||
# Laravel 5 & Lumen specific | ||
public/storage | ||
public/hot | ||
storage/*.key | ||
storage/settings.json | ||
storage/*.sqlite | ||
.env.*.php | ||
.env.php | ||
.env | ||
.env.bak | ||
env.php | ||
.env.generated | ||
.vagrant | ||
#Homestead.yaml | ||
Homestead.json | ||
LocalValetDriver.php | ||
|
||
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer | ||
.rocketeer/ | ||
|
||
tmp/ | ||
|
||
# intellij files | ||
.idea/composerJson.xml | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/dictionaries | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.xml | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
cmake-build-debug/ | ||
.idea/**/mongoSettings.xml | ||
*.iws | ||
out/ | ||
.idea_modules/ | ||
atlassian-ide-plugin.xml | ||
.idea/replstate.xml | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
.idea | ||
phpvms.iml | ||
phpvms_next.iml | ||
|
||
# Gradle: | ||
public/info.php | ||
|
||
# Error Logs | ||
error_log | ||
|
||
.sass-cache | ||
.DS_Store | ||
/config.php | ||
/VERSION |
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,27 @@ | ||
<?php | ||
|
||
namespace Modules\Sample\Awards; | ||
|
||
use App\Contracts\Award; | ||
|
||
/** | ||
* Class SampleAward | ||
*/ | ||
class SampleAward extends Award | ||
{ | ||
public $name = 'Sample Award'; | ||
|
||
/** | ||
* This is the method that needs to be implemented. | ||
* You have access to $this->user, which holds the current | ||
* user the award is being checked against | ||
* | ||
* @param null $params Parameters passed in from the UI | ||
* | ||
* @return bool | ||
*/ | ||
public function check($params = null): bool | ||
{ | ||
return false; | ||
} | ||
} |
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,5 @@ | ||
<?php | ||
|
||
return [ | ||
'name' => 'Sample', | ||
]; |
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 Modules\Sample\Database\Seeders; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use Illuminate\Database\Seeder; | ||
|
||
class SampleDatabaseSeeder extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
* | ||
* @return void | ||
*/ | ||
public function run() | ||
{ | ||
Model::unguard(); | ||
|
||
// $this->call("OthersTableSeeder"); | ||
} | ||
} |
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,65 @@ | ||
<?php | ||
|
||
namespace Modules\Sample\Http\Controllers\Admin; | ||
|
||
use App\Contracts\Controller; | ||
use Illuminate\Http\Request; | ||
|
||
/** | ||
* Class AdminController | ||
*/ | ||
class AdminController extends Controller | ||
{ | ||
/** | ||
* Display a listing of the resource. | ||
*/ | ||
public function index() | ||
{ | ||
return view('sample::admin.index'); | ||
} | ||
|
||
/** | ||
* Show the form for creating a new resource. | ||
*/ | ||
public function create() | ||
{ | ||
return view('sample::admin.create'); | ||
} | ||
|
||
/** | ||
* Store a newly created resource in storage. | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
} | ||
|
||
/** | ||
* Show the specified resource. | ||
*/ | ||
public function show() | ||
{ | ||
return view('sample::admin.show'); | ||
} | ||
|
||
/** | ||
* Show the form for editing the specified resource. | ||
*/ | ||
public function edit() | ||
{ | ||
return view('sample::admin.edit'); | ||
} | ||
|
||
/** | ||
* Update the specified resource in storage. | ||
*/ | ||
public function update(Request $request) | ||
{ | ||
} | ||
|
||
/** | ||
* Remove the specified resource from storage. | ||
*/ | ||
public function destroy() | ||
{ | ||
} | ||
} |
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,38 @@ | ||
<?php | ||
|
||
namespace Modules\Sample\Http\Controllers\Api; | ||
|
||
use App\Contracts\Controller; | ||
use Illuminate\Http\Request; | ||
|
||
/** | ||
* Class SampleController | ||
*/ | ||
class SampleController extends Controller | ||
{ | ||
/** | ||
* Just send out a message | ||
* | ||
* @param Request $request | ||
* | ||
* @return \Illuminate\Http\JsonResponse | ||
*/ | ||
public function index(Request $request) | ||
{ | ||
return $this->message('Hello, world!'); | ||
} | ||
|
||
/** | ||
* @param Request $request | ||
* | ||
* @return \Illuminate\Http\JsonResponse | ||
*/ | ||
public function hello(Request $request) | ||
{ | ||
// Another way to return JSON, this for a custom response | ||
// It's recommended to use Resources for responses from the database | ||
return response()->json([ | ||
'name' => Auth::user()->name, | ||
]); | ||
} | ||
} |
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,67 @@ | ||
<?php | ||
|
||
namespace Modules\Sample\Http\Controllers; | ||
|
||
use App\Contracts\Controller; | ||
use Illuminate\Http\Request; | ||
|
||
/** | ||
* Class SampleController | ||
*/ | ||
class SampleController extends Controller | ||
{ | ||
/** | ||
* Display a listing of the resource. | ||
*/ | ||
public function index() | ||
{ | ||
return view('sample::index'); | ||
} | ||
|
||
/** | ||
* Show the form for creating a new resource. | ||
*/ | ||
public function create() | ||
{ | ||
return view('sample::create'); | ||
} | ||
|
||
/** | ||
* Store a newly created resource in storage. | ||
* | ||
* @param Request $request | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
} | ||
|
||
/** | ||
* Show the specified resource. | ||
*/ | ||
public function show() | ||
{ | ||
return view('sample::show'); | ||
} | ||
|
||
/** | ||
* Show the form for editing the specified resource. | ||
*/ | ||
public function edit() | ||
{ | ||
return view('sample::edit'); | ||
} | ||
|
||
/** | ||
* Update the specified resource in storage. | ||
*/ | ||
public function update(Request $request) | ||
{ | ||
} | ||
|
||
/** | ||
* Remove the specified resource from storage. | ||
*/ | ||
public function destroy() | ||
{ | ||
} | ||
} |
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,8 @@ | ||
<?php | ||
|
||
// This is the admin path. Comment this out if you don't have | ||
// an admin panel component. | ||
Route::group([], function () { | ||
Route::get('/', 'AdminController@index'); | ||
Route::get('/create', 'AdminController@create'); | ||
}); |
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,17 @@ | ||
<?php | ||
|
||
/** | ||
* This is publicly accessible | ||
*/ | ||
Route::group(['middleware' => []], function () { | ||
Route::get('/', 'SampleController@index'); | ||
}); | ||
|
||
/* | ||
* This is required to have a valid API key | ||
*/ | ||
Route::group(['middleware' => [ | ||
'api.auth', | ||
]], function () { | ||
Route::get('/hello', 'SampleController@hello'); | ||
}); |
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,9 @@ | ||
<?php | ||
|
||
Route::group(['middleware' => [ | ||
'role:user', // leave blank to make this public | ||
]], function () { | ||
// all your routes are prefixed with the above prefix | ||
// e.g. yoursite.com/sample | ||
Route::get('/', 'SampleController@index'); | ||
}); |
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,17 @@ | ||
<?php | ||
|
||
namespace Modules\Sample\Listeners; | ||
|
||
use App\Events\TestEvent; | ||
use Log; | ||
|
||
class TestEventListener | ||
{ | ||
/** | ||
* Handle the event. | ||
*/ | ||
public function handle(TestEvent $event) | ||
{ | ||
Log::info('Received event', [$event]); | ||
} | ||
} |
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,15 @@ | ||
<?php | ||
|
||
namespace Modules\Sample\Models; | ||
|
||
use App\Contracts\Model; | ||
|
||
/** | ||
* Class SampleTable | ||
*/ | ||
class SampleTable extends Model | ||
{ | ||
public $table = ''; | ||
|
||
protected $fillable = []; | ||
} |
Oops, something went wrong.