first commit
This commit is contained in:
0
modules/Offline/Assets/.gitkeep
Normal file
0
modules/Offline/Assets/.gitkeep
Normal file
0
modules/Offline/Config/.gitkeep
Normal file
0
modules/Offline/Config/.gitkeep
Normal file
7
modules/Offline/Config/config.php
Normal file
7
modules/Offline/Config/config.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'Offline',
|
||||
|
||||
];
|
||||
0
modules/Offline/Console/.gitkeep
Normal file
0
modules/Offline/Console/.gitkeep
Normal file
0
modules/Offline/Database/Migrations/.gitkeep
Normal file
0
modules/Offline/Database/Migrations/.gitkeep
Normal file
0
modules/Offline/Database/Seeders/.gitkeep
Normal file
0
modules/Offline/Database/Seeders/.gitkeep
Normal file
45
modules/Offline/Database/Seeders/OfflineDatabaseSeeder.php
Normal file
45
modules/Offline/Database/Seeders/OfflineDatabaseSeeder.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Setting;
|
||||
|
||||
class OfflineDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Model::unguard();
|
||||
|
||||
$this->create();
|
||||
|
||||
Model::reguard();
|
||||
}
|
||||
|
||||
private function create()
|
||||
{
|
||||
$methods = array();
|
||||
|
||||
$methods[] = array(
|
||||
'code' => 'offline.cash.1',
|
||||
'name' => 'Cash',
|
||||
'order' => '1',
|
||||
'description' => null,
|
||||
);
|
||||
|
||||
$methods[] = array(
|
||||
'code' => 'offline.bank_transfer.2',
|
||||
'name' => 'Bank Transfer',
|
||||
'order' => '2',
|
||||
'description' => null,
|
||||
);
|
||||
|
||||
Setting::set('offline.payment.methods', json_encode($methods));
|
||||
}
|
||||
}
|
||||
0
modules/Offline/Entities/.gitkeep
Normal file
0
modules/Offline/Entities/.gitkeep
Normal file
0
modules/Offline/Events/.gitkeep
Normal file
0
modules/Offline/Events/.gitkeep
Normal file
0
modules/Offline/Events/Handlers/.gitkeep
Normal file
0
modules/Offline/Events/Handlers/.gitkeep
Normal file
21
modules/Offline/Events/Handlers/OfflineAdminMenu.php
Normal file
21
modules/Offline/Events/Handlers/OfflineAdminMenu.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Events\Handlers;
|
||||
|
||||
use App\Events\AdminMenuCreated;
|
||||
|
||||
class OfflineAdminMenu
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param AdminMenuCreated $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(AdminMenuCreated $event)
|
||||
{
|
||||
// Add child to existing item
|
||||
$item = $event->menu->whereTitle(trans_choice('general.settings', 2));
|
||||
$item->url('modules/offline/settings', trans('offline::offline.offline'), 4, ['icon' => 'fa fa-angle-double-right']);
|
||||
}
|
||||
}
|
||||
19
modules/Offline/Events/Handlers/OfflinePaymentGateway.php
Normal file
19
modules/Offline/Events/Handlers/OfflinePaymentGateway.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Events\Handlers;
|
||||
|
||||
use App\Events\PaymentGatewayListing;
|
||||
|
||||
class OfflinePaymentGateway
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param PaymentGatewayListing $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(PaymentGatewayListing $event)
|
||||
{
|
||||
return json_decode(setting('offline.payment.methods'), true);
|
||||
}
|
||||
}
|
||||
0
modules/Offline/Http/Controllers/.gitkeep
Normal file
0
modules/Offline/Http/Controllers/.gitkeep
Normal file
115
modules/Offline/Http/Controllers/Settings.php
Normal file
115
modules/Offline/Http/Controllers/Settings.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Http\Controllers;
|
||||
|
||||
use Artisan;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Routing\Controller;
|
||||
|
||||
use Modules\Offline\Http\Requests\Setting as Request;
|
||||
use Modules\Offline\Http\Requests\SettingGet as GRequest;
|
||||
use Modules\Offline\Http\Requests\SettingDelete as DRequest;
|
||||
|
||||
class Settings extends Controller
|
||||
{
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
* @return Response
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$items = json_decode(setting('offline.payment.methods'));
|
||||
|
||||
return view('offline::edit', compact('items'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
$offline = json_decode(setting('offline.payment.methods'), true);
|
||||
|
||||
if (isset($request['method'])) {
|
||||
foreach ($offline as $key => $method) {
|
||||
if ($method['code'] == $request['method']) {
|
||||
$offline[$key]['code'] = 'offline.' . $request['code'] . '.' . (count($offline) + 1);
|
||||
$offline[$key]['name'] = $request['name'];
|
||||
$offline[$key]['order'] = $request['order'];
|
||||
$offline[$key]['description'] = $request['description'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$offline[] = array(
|
||||
'code' => 'offline.' . $request['code'] . '.' . (count($offline) + 1),
|
||||
'name' => $request['name'],
|
||||
'order' => $request['order'],
|
||||
'description' => $request['description']
|
||||
);
|
||||
}
|
||||
|
||||
// Set Api Token
|
||||
setting()->set('offline.payment.methods', json_encode($offline));
|
||||
|
||||
setting()->save();
|
||||
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
return redirect('modules/offline/settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* @return Response
|
||||
*/
|
||||
public function get(GRequest $request)
|
||||
{
|
||||
$code = $request['code'];
|
||||
|
||||
$offline = json_decode(setting('offline.payment.methods'), true);
|
||||
|
||||
foreach ($offline as $key => $method) {
|
||||
if ($method['code'] == $code) {
|
||||
$data = $method;
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'errors' => false,
|
||||
'success' => true,
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* @return Response
|
||||
*/
|
||||
public function delete(DRequest $request)
|
||||
{
|
||||
$code = $request['code'];
|
||||
|
||||
$offline = json_decode(setting('offline.payment.methods'), true);
|
||||
|
||||
foreach ($offline as $key => $method) {
|
||||
if ($method['code'] == $code) {
|
||||
unset($offline[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Api Token
|
||||
setting()->set('offline.payment.methods', json_encode($offline));
|
||||
|
||||
setting()->save();
|
||||
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
return response()->json([
|
||||
'errors' => false,
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
0
modules/Offline/Http/Middleware/.gitkeep
Normal file
0
modules/Offline/Http/Middleware/.gitkeep
Normal file
0
modules/Offline/Http/Requests/.gitkeep
Normal file
0
modules/Offline/Http/Requests/.gitkeep
Normal file
31
modules/Offline/Http/Requests/Setting.php
Normal file
31
modules/Offline/Http/Requests/Setting.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class Setting extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string',
|
||||
'code' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
modules/Offline/Http/Requests/SettingDelete.php
Normal file
30
modules/Offline/Http/Requests/SettingDelete.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class SettingDelete extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'code' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
modules/Offline/Http/Requests/SettingGet.php
Normal file
30
modules/Offline/Http/Requests/SettingGet.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Http\Requests;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
class SettingGet extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'code' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
8
modules/Offline/Http/routes.php
Normal file
8
modules/Offline/Http/routes.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
Route::group(['middleware' => ['web', 'auth', 'language', 'adminmenu', 'permission:read-admin-panel'], 'prefix' => 'modules/offline', 'namespace' => 'Modules\Offline\Http\Controllers'], function () {
|
||||
Route::get('settings', 'settings@edit');
|
||||
Route::post('settings', 'settings@update');
|
||||
Route::post('settings/get', 'settings@get');
|
||||
Route::post('settings/delete', 'settings@delete');
|
||||
});
|
||||
0
modules/Offline/Jobs/.gitkeep
Normal file
0
modules/Offline/Jobs/.gitkeep
Normal file
0
modules/Offline/Mail/.gitkeep
Normal file
0
modules/Offline/Mail/.gitkeep
Normal file
0
modules/Offline/Providers/.gitkeep
Normal file
0
modules/Offline/Providers/.gitkeep
Normal file
120
modules/Offline/Providers/OfflineServiceProvider.php
Normal file
120
modules/Offline/Providers/OfflineServiceProvider.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Offline\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Database\Eloquent\Factory;
|
||||
|
||||
use App\Events\AdminMenuCreated;
|
||||
use Modules\Offline\Events\Handlers\OfflineAdminMenu;
|
||||
|
||||
use App\Events\PaymentGatewayListing;
|
||||
use Modules\Offline\Events\Handlers\OfflinePaymentGateway;
|
||||
|
||||
class OfflineServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Indicates if loading of the provider is deferred.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $defer = false;
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerTranslations();
|
||||
$this->registerConfig();
|
||||
$this->registerViews();
|
||||
$this->registerFactories();
|
||||
|
||||
$this->app['events']->listen(AdminMenuCreated::class, OfflineAdminMenu::class);
|
||||
$this->app['events']->listen(PaymentGatewayListing::class, OfflinePaymentGateway::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->publishes([
|
||||
__DIR__.'/../Config/config.php' => config_path('offline.php'),
|
||||
], 'config');
|
||||
$this->mergeConfigFrom(
|
||||
__DIR__.'/../Config/config.php', 'offline'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register views.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerViews()
|
||||
{
|
||||
$viewPath = resource_path('views/modules/offline');
|
||||
|
||||
$sourcePath = __DIR__.'/../Resources/views';
|
||||
|
||||
$this->publishes([
|
||||
$sourcePath => $viewPath
|
||||
]);
|
||||
|
||||
$this->loadViewsFrom(array_merge(array_map(function ($path) {
|
||||
return $path . '/modules/offline';
|
||||
}, \Config::get('view.paths')), [$sourcePath]), 'offline');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerTranslations()
|
||||
{
|
||||
$langPath = resource_path('lang/modules/offline');
|
||||
|
||||
if (is_dir($langPath)) {
|
||||
$this->loadTranslationsFrom($langPath, 'offline');
|
||||
} else {
|
||||
$this->loadTranslationsFrom(__DIR__ .'/../Resources/lang', 'offline');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register an additional directory of factories.
|
||||
* @source https://github.com/sebastiaanluca/laravel-resource-flow/blob/develop/src/Modules/ModuleServiceProvider.php#L66
|
||||
*/
|
||||
public function registerFactories()
|
||||
{
|
||||
if (! app()->environment('production')) {
|
||||
app(Factory::class)->load(__DIR__ . '/Database/factories');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
0
modules/Offline/Repositories/.gitkeep
Normal file
0
modules/Offline/Repositories/.gitkeep
Normal file
0
modules/Offline/Resources/lang/.gitkeep
Normal file
0
modules/Offline/Resources/lang/.gitkeep
Normal file
11
modules/Offline/Resources/lang/en-GB/offline.php
Normal file
11
modules/Offline/Resources/lang/en-GB/offline.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'offline' => 'Offline Payments',
|
||||
'add_new' => 'Add New',
|
||||
'code' => 'Code',
|
||||
'order' => 'Order',
|
||||
'payment_gateways' => 'Offline Payment Methods',
|
||||
|
||||
];
|
||||
0
modules/Offline/Resources/views/.gitkeep
Normal file
0
modules/Offline/Resources/views/.gitkeep
Normal file
133
modules/Offline/Resources/views/edit.blade.php
Normal file
133
modules/Offline/Resources/views/edit.blade.php
Normal file
@@ -0,0 +1,133 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('offline::offline.offline'))
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-4 no-padding-left">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('offline::offline.add_new') }}</h3>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
{!! Form::open(['url' => 'modules/offline/settings', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textGroup('code', trans('offline::offline.code'), 'key', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textGroup('order', trans('offline::offline.order'), 'sort', [], 0, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('modules/offline/settings') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
<div class="col-md-8 no-padding-left">
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('offline::offline.payment_gateways') }}</h3>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-3">{{ trans('offline::offline.code') }}</th>
|
||||
<th class="col-md-3">{{ trans('offline::offline.order') }}</th>
|
||||
<th class="col-md-3">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($items)
|
||||
@foreach($items as $item)
|
||||
<tr id="method-{{ $item->code }}">
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->code }}</td>
|
||||
<td>{{ $item->order }}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-primary btn-xs method-edit" id="edit-{{ $item->code }}" title="{{ trans('general.edit') }}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</button>
|
||||
<button type="button" class="btn btn-danger btn-xs method-delete" id="delete-{{ $item->code }}" title="{{ trans('general.delete') }}"><i class="fa fa-trash-o" aria-hidden="true"></i> {{ trans('general.delete') }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.method-edit').on('click', function() {
|
||||
var code = $(this).attr('id').replace('edit-', '');
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("modules/offline/settings/get") }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {code: code},
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('input[name="name"]').val(json['data']['name']);
|
||||
$('input[name="code"]').val(json['data']['code']);
|
||||
$('input[name="sort"]').val(json['data']['sort']);
|
||||
$('input[name="description"]').val(json['data']['description']);
|
||||
|
||||
$('input[name="method"]').remove();
|
||||
|
||||
$('.col-md-4 .box-body').append('<input type="hidden" name="method" value="' + json['data']['code'] + '">');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.method-delete').on('click', function() {
|
||||
var code = $(this).attr('id').replace('delete-', '');
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("modules/offline/settings/delete") }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {code: code},
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#method-' + code).remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
0
modules/Offline/Tests/.gitkeep
Normal file
0
modules/Offline/Tests/.gitkeep
Normal file
15
modules/Offline/composer.json
Normal file
15
modules/Offline/composer.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "akaunting/offline",
|
||||
"description": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Akaunting",
|
||||
"email": "info@akaunting.com"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Modules\\Offline\\": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
19
modules/Offline/module.json
Normal file
19
modules/Offline/module.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Offline",
|
||||
"alias": "offline",
|
||||
"description": "",
|
||||
"version": "1.0.0",
|
||||
"category": "payment-gateways",
|
||||
"keywords": [],
|
||||
"active": 1,
|
||||
"order": 0,
|
||||
"providers": [
|
||||
"Modules\\Offline\\Providers\\OfflineServiceProvider"
|
||||
],
|
||||
"aliases": {},
|
||||
"files": [
|
||||
"start.php"
|
||||
],
|
||||
"requires": [],
|
||||
"settings": []
|
||||
}
|
||||
17
modules/Offline/start.php
Normal file
17
modules/Offline/start.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Namespaces And Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When a module starting, this file will executed automatically. This helps
|
||||
| to register some namespaces like translator or view. Also this file
|
||||
| will load the routes file for each module. You may also modify
|
||||
| this file as you want.
|
||||
|
|
||||
*/
|
||||
|
||||
if (!app()->routesAreCached()) {
|
||||
require __DIR__ . '/Http/routes.php';
|
||||
}
|
||||
Reference in New Issue
Block a user