Skip to content

Commit c60afa8

Browse files
committed
Project easy installer
1 parent b3365ae commit c60afa8

File tree

74 files changed

+18380
-14
lines changed

Some content is hidden

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

74 files changed

+18380
-14
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use App\SystemSetting;
66
use Illuminate\Support\Facades\View;
7+
use Illuminate\Pagination\Paginator;
8+
use Illuminate\Support\Facades\Cache;
79
use Illuminate\Support\Facades\Schema;
810
use Illuminate\Support\ServiceProvider;
911
use Illuminate\Support\Facades\Validator;
@@ -25,10 +27,26 @@ public function register()
2527
*
2628
* @return void
2729
*/
28-
public function boot()
30+
public function boot()
2931
{
30-
View::share('shareSettings', SystemSetting::first());
3132

33+
try {
34+
\DB::connection()->getPdo();
35+
Schema::defaultStringLength(191);
36+
37+
if(\DB::connection()->getDatabaseName()){
38+
if(Schema::hasTable('system_settings')){
39+
View::share('shareSettings', Cache::rememberForever('shareSettings', function() {
40+
return SystemSetting::first();
41+
}));
42+
};
43+
}
44+
}catch(\Exception $ex){
45+
46+
return redirect(route('LaravelInstaller::environment'));
47+
}
48+
49+
// Paginator::useBootstrap();
3250
Schema::defaultStringLength(191);
3351
Validator::extend('recaptcha', 'App\\Validators\\ReCaptcha@validate');
3452
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"laravel/tinker": "^2.0",
2222
"laravel/ui": "^2.0",
2323
"livewire/livewire": "^1.3",
24+
"rachidlaasri/laravel-installer": "^4.1",
2425
"srmklive/paypal": "~1.0"
2526
},
2627
"require-dev": {

composer.lock

Lines changed: 65 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/installer.php

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Server Requirements
8+
|--------------------------------------------------------------------------
9+
|
10+
| This is the default Laravel server requirements, you can add as many
11+
| as your application require, we check if the extension is enabled
12+
| by looping through the array and run "extension_loaded" on it.
13+
|
14+
*/
15+
'core' => [
16+
'minPhpVersion' => '7.0.0',
17+
],
18+
'final' => [
19+
'key' => true,
20+
'publish' => false,
21+
],
22+
'requirements' => [
23+
'php' => [
24+
'openssl',
25+
'pdo',
26+
'mbstring',
27+
'tokenizer',
28+
'JSON',
29+
'cURL',
30+
],
31+
'apache' => [
32+
'mod_rewrite',
33+
],
34+
],
35+
36+
/*
37+
|--------------------------------------------------------------------------
38+
| Folders Permissions
39+
|--------------------------------------------------------------------------
40+
|
41+
| This is the default Laravel folders permissions, if your application
42+
| requires more permissions just add them to the array list bellow.
43+
|
44+
*/
45+
'permissions' => [
46+
'storage/framework/' => '775',
47+
'storage/logs/' => '775',
48+
'bootstrap/cache/' => '775',
49+
],
50+
51+
/*
52+
|--------------------------------------------------------------------------
53+
| Environment Form Wizard Validation Rules & Messages
54+
|--------------------------------------------------------------------------
55+
|
56+
| This are the default form field validation rules. Available Rules:
57+
| https://laravel.com/docs/5.4/validation#available-validation-rules
58+
|
59+
*/
60+
'environment' => [
61+
'form' => [
62+
'rules' => [
63+
'app_name' => 'required|string|max:50',
64+
'environment' => 'required|string|max:50',
65+
'environment_custom' => 'required_if:environment,other|max:50',
66+
'app_debug' => 'required|string',
67+
'app_log_level' => 'required|string|max:50',
68+
'app_url' => 'required|url',
69+
'database_connection' => 'required|string|max:50',
70+
'database_hostname' => 'required|string|max:50',
71+
'database_port' => 'required|numeric',
72+
'database_name' => 'required|string|max:50',
73+
'database_username' => 'required|string|max:50',
74+
'database_password' => 'nullable|string|max:50',
75+
'broadcast_driver' => 'required|string|max:50',
76+
'cache_driver' => 'required|string|max:50',
77+
'session_driver' => 'required|string|max:50',
78+
'queue_driver' => 'required|string|max:50',
79+
'redis_hostname' => 'required|string|max:50',
80+
'redis_password' => 'required|string|max:50',
81+
'redis_port' => 'required|numeric',
82+
'mail_driver' => 'required|string|max:50',
83+
'mail_host' => 'required|string|max:50',
84+
'mail_port' => 'required|string|max:50',
85+
'mail_username' => 'required|string|max:50',
86+
'mail_password' => 'required|string|max:50',
87+
'mail_encryption' => 'required|string|max:50',
88+
'pusher_app_id' => 'max:50',
89+
'pusher_app_key' => 'max:50',
90+
'pusher_app_secret' => 'max:50',
91+
],
92+
],
93+
],
94+
95+
/*
96+
|--------------------------------------------------------------------------
97+
| Installed Middleware Options
98+
|--------------------------------------------------------------------------
99+
| Different available status switch configuration for the
100+
| canInstall middleware located in `canInstall.php`.
101+
|
102+
*/
103+
'installed' => [
104+
'redirectOptions' => [
105+
'route' => [
106+
'name' => 'welcome',
107+
'data' => [],
108+
],
109+
'abort' => [
110+
'type' => '404',
111+
],
112+
'dump' => [
113+
'data' => 'Dumping a not found message.',
114+
],
115+
],
116+
],
117+
118+
/*
119+
|--------------------------------------------------------------------------
120+
| Selected Installed Middleware Option
121+
|--------------------------------------------------------------------------
122+
| The selected option fo what happens when an installer instance has been
123+
| Default output is to `/resources/views/error/404.blade.php` if none.
124+
| The available middleware options include:
125+
| route, abort, dump, 404, default, ''
126+
|
127+
*/
128+
'installedAlreadyAction' => '',
129+
130+
/*
131+
|--------------------------------------------------------------------------
132+
| Updater Enabled
133+
|--------------------------------------------------------------------------
134+
| Can the application run the '/update' route with the migrations.
135+
| The default option is set to False if none is present.
136+
| Boolean value
137+
|
138+
*/
139+
'updaterEnabled' => 'true',
140+
141+
];
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//colors
2+
$color_0: #ff0
3+
$color_1: #000
4+
$color_2: silver
5+
$color_3: #666
6+
$color_4: #111
7+
$color_5: #1d73a2
8+
$color_6: #175c82
9+
$color_7: rgba(0, 0, 0, .19)
10+
$color_8: rgba(0, 0, 0, .23)
11+
$color_9: #357295
12+
$color_10: #fff
13+
$color_11: #cacfd2
14+
$color_12: #34a0db
15+
$color_13: rgba(0, 0, 0, .12)
16+
$color_14: rgba(0, 0, 0, .24)
17+
$color_15: #2490cb
18+
$color_16: #eee
19+
$color_17: #222
20+
$color_18: rgba(0, 0, 0, .16)
21+
$color_19: #2ecc71
22+
$color_20: #e74c3c
23+
$color_21: #f5f5f5
24+
$color_22: rgba(0, 0, 0, .2)
25+
26+
//fonts
27+
$font_0: Ionicons
28+
$font_1: sans-serif
29+
$font_2: monospace
30+
$font_3: Roboto
31+
$font_4: Helvetica Neue
32+
$font_5: Helvetica
33+
$font_6: Arial
34+
$font_7: Courier New
35+
$font_8: Courier
36+
$font_9: Lucida Sans Typewriter
37+
$font_10: Lucida Typewriter
38+
39+
//urls
40+
$url_0: url(https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900)
41+
$url_1: url(../fonts/ionicons.eot?v=2.0.1)
42+
$url_2: url(../fonts/ionicons.eot?v=2.0.1#iefix)
43+
$url_3: url(../fonts/ionicons.ttf?v=2.0.1)
44+
$url_4: url(../fonts/ionicons.woff?v=2.0.1)
45+
$url_5: url(../fonts/ionicons.svg?v=2.0.1#Ionicons)
46+
$url_6: url(../img/background.png)

0 commit comments

Comments
 (0)