Skip to content

Commit 161864d

Browse files
committed
restructure
1 parent c3fc00d commit 161864d

File tree

550 files changed

+265
-22191
lines changed

Some content is hidden

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

550 files changed

+265
-22191
lines changed
File renamed without changes.
File renamed without changes.

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
/public/hot
55
/public/storage
66
/storage/*.key
7-
core/vendor
8-
.env
7+
/vendor
98
.composer.lock
9+
.env
1010
.env.backup
1111
.env.production
1212
Homestead.json
@@ -18,3 +18,4 @@ yarn-error.log
1818
/.fleet
1919
/.idea
2020
/.vscode
21+
composer.lock

README.md

Lines changed: 66 additions & 2 deletions
File renamed without changes.
File renamed without changes.

core/app/Http/Helper.php renamed to app/Http/Helper.php

Lines changed: 76 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function fileUpload($file, $folder, $name = null)
4444
$imageName = Str::slug($name) . rand(0, 9999) . '.' . $file->extension();
4545
$path = 'assets/uploads/' . $folder . date('/Y/m/d');
4646
if (!File::exists($path)) {
47-
File::makeDirectory($path, 0777, true,true);
47+
File::makeDirectory($path, 0777, true, true);
4848
}
4949
$file->move($path, $imageName);
5050
return $path . '/' . $imageName;
@@ -124,41 +124,41 @@ function dateTimeFormat($data)
124124
function showBalance()
125125
{
126126
$user = Auth::user();
127-
if(isset($user->plan_expense_id)){
127+
if (isset($user->plan_expense_id)) {
128128
$expense = PlanExpense::where('id', $user->plan_expense_id)
129-
->where('activated_at', '<=', now())
130-
->where(function ($query) {
131-
$query->whereNull('expire_at')
132-
->orWhere('expire_at', '>', now());
133-
})->where('user_id', $user->id)->first();
134-
if($expense != ''){
129+
->where('activated_at', '<=', now())
130+
->where(function ($query) {
131+
$query->whereNull('expire_at')
132+
->orWhere('expire_at', '>', now());
133+
})->where('user_id', $user->id)->first();
134+
if ($expense != '') {
135135
$restImage = $expense->image_count - $expense->current_image_count;
136136
$restWord = $expense->word_count - $expense->current_word_count;
137137
//remaining days
138138
$today = Carbon::parse(date("Y-m-d"));
139139
$expireDate = Carbon::parse($expense->expire_at);
140140
$remainingDays = $expireDate->diffInDays($today);
141141
// templates type
142-
$templates = explode(',',$expense->plan->templates);
142+
$templates = explode(',', $expense->plan->templates);
143143
return (object) [
144-
'image'=> $restImage,
145-
'max_words'=> $expense->plan->max_words,
146-
'word_count'=> $restWord,
147-
'remaining_days'=>$remainingDays,
144+
'image' => $restImage,
145+
'max_words' => $expense->plan->max_words,
146+
'word_count' => $restWord,
147+
'remaining_days' => $remainingDays,
148148
'templates' => $templates,
149-
'code_generate_enabled'=>$expense->plan->code_generate_enabled,
150-
'chat_enabled'=>$expense->plan->chat_enabled,
151-
'support_enabled'=>$expense->plan->support_enabled,
149+
'code_generate_enabled' => $expense->plan->code_generate_enabled,
150+
'chat_enabled' => $expense->plan->chat_enabled,
151+
'support_enabled' => $expense->plan->support_enabled,
152152
];
153-
}else{
153+
} else {
154154
return "";
155155
}
156-
}else{
156+
} else {
157157
return "";
158158
}
159159
}
160160

161-
function balanceDeduction($type, $n=1)
161+
function balanceDeduction($type, $n = 1)
162162
{
163163
// call_api,document,image
164164
$status = false;
@@ -238,94 +238,97 @@ function translate($data)
238238
}
239239
function menuActive($data)
240240
{
241-
if(!is_array($data)){
241+
if (!is_array($data)) {
242242
$data = explode(', ', $data);
243243
}
244-
foreach($data as $value){
245-
if(request()->routeIs($value)){
244+
foreach ($data as $value) {
245+
if (request()->routeIs($value)) {
246246
return true;
247247
}
248248
}
249249
return false;
250250
}
251-
function freePlan(){
252-
return Plan::where('price','<=', 0)->first();
251+
function freePlan()
252+
{
253+
return Plan::where('price', '<=', 0)->first();
253254
}
254-
function demoPlan(){
255-
if(readConfig('demo')){
255+
function demoPlan()
256+
{
257+
if (readConfig('demo')) {
256258
return (object) [
257-
'max_words'=> 200,
258-
'image'=> 5,
259-
'word_count'=> 500,
259+
'max_words' => 200,
260+
'image' => 5,
261+
'word_count' => 500,
260262
];
261-
}else{
263+
} else {
262264
return "";
263265
}
264266
}
265-
function iconGenerate($photo){
267+
function iconGenerate($photo)
268+
{
266269
$path = 'assets/uploads/pwaIcons';
267270
if (!File::exists($path)) {
268271
File::makeDirectory($path, 0755, true, true);
269272
}
270273

271-
$img= Image::make($photo);
272-
$img->resize(512,512);
273-
$img->save($path.'/icon-512x512.png');
274-
$img->resize(384,384);
275-
$img->save($path.'/icon-384x384.png');
276-
$img->resize(192,192);
277-
$img->save($path.'/icon-192x192.png');
278-
$img->resize(152,152);
279-
$img->save($path.'/icon-152x152.png');
280-
$img->resize(144,144);
281-
$img->save($path.'/icon-144x144.png');
282-
$img->resize(128,128);
283-
$img->save($path.'/icon-128x128.png');
284-
$img->resize(96,96);
285-
$img->save($path.'/icon-96x96.png');
286-
$img->resize(72,72);
287-
$img->save($path.'/icon-72x72.png');
274+
$img = Image::make($photo);
275+
$img->resize(512, 512);
276+
$img->save($path . '/icon-512x512.png');
277+
$img->resize(384, 384);
278+
$img->save($path . '/icon-384x384.png');
279+
$img->resize(192, 192);
280+
$img->save($path . '/icon-192x192.png');
281+
$img->resize(152, 152);
282+
$img->save($path . '/icon-152x152.png');
283+
$img->resize(144, 144);
284+
$img->save($path . '/icon-144x144.png');
285+
$img->resize(128, 128);
286+
$img->save($path . '/icon-128x128.png');
287+
$img->resize(96, 96);
288+
$img->save($path . '/icon-96x96.png');
289+
$img->resize(72, 72);
290+
$img->save($path . '/icon-72x72.png');
288291

289292
$white = 'assets/images/default/white.png';
290293
$splash = Image::make($white);
291294
$splash->insert($photo, 'center');
292-
$splash->resize(2048,2732);
293-
$splash->save($path."/splash-2048x2732.png");
294-
$splash->resize(1668,2388);
295-
$splash->save($path."/splash-1668x2388.png");
296-
$splash->resize(1668,2224);
297-
$splash->save($path."/splash-1668x2224.png");
298-
$splash->resize(1668,2224);
299-
$splash->save($path."/splash-1668x2224.png");
300-
$splash->resize(1536,2048);
301-
$splash->save($path."/splash-1536x2048.png");
302-
$splash->resize(1242,2688);
303-
$splash->save($path."/splash-1242x2688.png");
304-
$splash->resize(1242,2208);
305-
$splash->save($path."/splash-1242x2208.png");
306-
$splash->resize(1125,2436);
307-
$splash->save($path."/splash-1125x2436.png");
308-
$splash->resize(828,1792);
309-
$splash->save($path."/splash-828x1792.png");
310-
$splash->resize(750,1334);
311-
$splash->save($path."/splash-750x1334.png");
312-
$splash->resize(640,1136);
313-
$splash->save($path."/splash-640x1136.png");
295+
$splash->resize(2048, 2732);
296+
$splash->save($path . "/splash-2048x2732.png");
297+
$splash->resize(1668, 2388);
298+
$splash->save($path . "/splash-1668x2388.png");
299+
$splash->resize(1668, 2224);
300+
$splash->save($path . "/splash-1668x2224.png");
301+
$splash->resize(1668, 2224);
302+
$splash->save($path . "/splash-1668x2224.png");
303+
$splash->resize(1536, 2048);
304+
$splash->save($path . "/splash-1536x2048.png");
305+
$splash->resize(1242, 2688);
306+
$splash->save($path . "/splash-1242x2688.png");
307+
$splash->resize(1242, 2208);
308+
$splash->save($path . "/splash-1242x2208.png");
309+
$splash->resize(1125, 2436);
310+
$splash->save($path . "/splash-1125x2436.png");
311+
$splash->resize(828, 1792);
312+
$splash->save($path . "/splash-828x1792.png");
313+
$splash->resize(750, 1334);
314+
$splash->save($path . "/splash-750x1334.png");
315+
$splash->resize(640, 1136);
316+
$splash->save($path . "/splash-640x1136.png");
314317
return "Yes";
315318
}
316319
function footerBlog()
317320
{
318-
$blogs = Blog::where('is_published',true)->take(3)->get();
321+
$blogs = Blog::where('is_published', true)->take(3)->get();
319322
return $blogs;
320323
}
321324

322325

323326
function pages()
324327
{
325-
return Page::where('active',true)->get();
328+
return Page::where('active', true)->get();
326329
}
327330

328331
function footerUseCase()
329332
{
330-
return UseCase::where('is_published',1)->limit(3)->get();
333+
return UseCase::where('is_published', 1)->limit(3)->get();
331334
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

core/artisan renamed to artisan

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

core/.gitignore

Lines changed: 0 additions & 19 deletions
This file was deleted.

core/README.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)