Skip to content

Commit db282ec

Browse files
authored
Merge pull request #22 from php-kchat/dev
Dev
2 parents d6ee83a + b2696df commit db282ec

25 files changed

+448
-213
lines changed

app/Http/Controllers/UserController.php

+3
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ function SaveProfile(Request $request){
318318
$file = $request->file('photo');
319319

320320
if(!empty($file)){
321+
if(!is_writable(public_path('/images'))){
322+
return json_encode(["error" => public_path('/images')." don't exist or don't have permission."]);
323+
}
321324
$image_path = $file->getClientOriginalName();
322325
$path = '/images/' . $image_path;
323326
$file->move(public_path('/images'), $image_path);

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"laravel/tinker": "^2.7"
1414
},
1515
"require-dev": {
16+
"barryvdh/laravel-debugbar": "^3.8",
1617
"fakerphp/faker": "^1.9.1",
1718
"laravel/pint": "^1.0",
1819
"laravel/sail": "^1.0.1",

lang/en/lang.php

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Validation Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines contain the default error messages used by
11+
| the validator class. Some of these rules have multiple versions such
12+
| as the size rules. Feel free to tweak each of these messages here.
13+
|
14+
*/
15+
16+
'all-your-total-message' => 'All your total Message',
17+
'all-your-total-conversations' => 'All your total Conversations',
18+
'this-month' => 'This Month',
19+
'total-users' => 'Total User\'s',
20+
'total-messages' => 'Total Message\'s',
21+
'total-conversations' => 'Total conversation\'s',
22+
'average-messages-per-user' => 'Average message\'s per user',
23+
'all-messages-per-day' => 'All message\'s per day',
24+
'all-users-per-day' => 'All user\'s per day',
25+
'all-conversations-per-day' => 'All conversation\'s per day',
26+
'all-your-messages-per-day' => 'All your message\'s per day',
27+
'all-your-conversations-per-day' => 'All your conversation\'s per day',
28+
'dashboard' => 'Dashboard',
29+
'messages' => 'Messages',
30+
'members' => 'Member\'s',
31+
'conversations' => 'Conversations',
32+
'settings' => 'Settings',
33+
'notification' => 'Notification',
34+
'activity' => 'Activity',
35+
'profile' => 'Profile',
36+
'logout' => 'Logout',
37+
'close' => 'Close',
38+
'last-created' => 'Last Created',
39+
'update-group' => 'Update Group',
40+
'whiteboard' => 'WhiteBoard',
41+
'send' => 'Send',
42+
'search-conversation' => 'Search Conversation',
43+
'name' => 'Name',
44+
'departement' => 'Departement',
45+
'email' => 'Email',
46+
'status' => 'Status',
47+
'search-using-mail' => 'Search using mail',
48+
'about-me' => 'About me',
49+
'created-at' => 'Created At',
50+
'updated-at' => 'Updated At',
51+
'select-all' => 'Select All',
52+
'delete' => 'Delete',
53+
'set-inactive' => 'Set Inactive',
54+
'set-active' => 'Set active',
55+
'block' => 'Block',
56+
'unblock' => 'UnBlock',
57+
'make-admin' => 'Make Admin',
58+
'revoke-admin-power' => 'Revoke Admin Power',
59+
'create-new-conversation' => 'Create New Conversation',
60+
'action' => 'Action',
61+
'departments' => 'Department\'s',
62+
'add-and-delete-department' => 'Add and Delete Department',
63+
'add-department' => 'Add Department',
64+
'department' => 'Department',
65+
'delete-department' => 'Delete Department',
66+
'timezone' => 'Timezone',
67+
'update-timezone' => 'Update Timezone',
68+
'file-upload-path' => 'File Upload Path',
69+
'place-it-outside-the-webroot-means-that-the-files-will-not-be-publicly-exposed' => 'Place it outside the webroot means that the files will not be publicly exposed.',
70+
'notifications' => 'Notification\'s',
71+
'activities' => 'Activitie\'s',
72+
'superadmin' => 'SuperAdmin',
73+
'change-password' => 'Change Password',
74+
];

lang/en/login.php

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Validation Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines contain the default error messages used by
11+
| the validator class. Some of these rules have multiple versions such
12+
| as the size rules. Feel free to tweak each of these messages here.
13+
|
14+
*/
15+
16+
'lang00000' => 'Sign in',
17+
'lang00001' => 'Sign in using form below',
18+
'lang00002' => 'Email',
19+
'lang00003' => 'Password',
20+
'lang00004' => 'Remember me',
21+
'lang00005' => 'Sign On',
22+
'lang00006' => 'Login',
23+
'lang00007' => 'No account',
24+
'lang00008' => 'Registration takes less than a minute but gives you full control over your orders.',
25+
'lang00009' => 'First Name',
26+
'lang00010' => 'Please enter first name',
27+
'lang00011' => 'E-mail Address',
28+
'lang00012' => 'Phone Number',
29+
'lang00013' => 'Password',
30+
'lang00014' => 'Confirm Password',
31+
'lang00015' => 'Already have account',
32+
'lang00016' => 'Last Name',
33+
'lang00017' => 'Please enter last Name',
34+
'lang00018' => 'Please enter valid email address!',
35+
'lang00019' => 'Please enter your phone number!',
36+
'lang00020' => 'Please enter password!',
37+
'lang00021' => 'Passwords do not match!',
38+
'lang00022' => 'Already have account',
39+
40+
];

lang/hi/lang.php

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Validation Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines contain the default error messages used by
11+
| the validator class. Some of these rules have multiple versions such
12+
| as the size rules. Feel free to tweak each of these messages here.
13+
|
14+
*/
15+
16+
'all-your-total-message' => 'आपके सभी संदेश',
17+
'all-your-total-conversations' => 'आपके सभी वार्तालाप',
18+
'this-month' => 'इस महीने',
19+
'total-users' => 'कुल उपयोगकर्ता',
20+
'total-messages' => 'कुल संदेश',
21+
'total-conversations' => 'कुल वार्तालाप',
22+
'average-messages-per-user' => 'प्रति उपयोगकर्ता औसत संदेश',
23+
'all-messages-per-day' => 'प्रतिदिन कुल संदेश',
24+
'all-users-per-day' => 'प्रतिदिन सभी उपयोगकर्ता',
25+
'all-conversations-per-day' => 'प्रतिदिन सभी वार्तालाप',
26+
'all-your-messages-per-day' => 'प्रतिदिन आपके सभी संदेश',
27+
'all-your-conversations-per-day' => 'प्रतिदिन आपके सभी वार्तालाप',
28+
'dashboard' => 'डैशबोर्ड',
29+
'messages' => 'संदेश',
30+
'members' => 'सदस्यों',
31+
'conversations' => 'वार्तालाप',
32+
'settings' => 'सेटिंग्स',
33+
'notification' => 'अधिसूचना',
34+
'activity' => 'गतिविधि',
35+
'profile' => 'प्रोफ़ाइल',
36+
'logout' => 'लॉगआउट',
37+
'close' => 'बंद करे',
38+
'last-created' => 'अंतिम बनाया गया',
39+
'update-group' => 'ग्रुप अपडेट करें',
40+
'whiteboard' => 'सफेद बोर्ड',
41+
'send' => 'भेजें',
42+
'search-conversation' => 'वार्तालाप खोजें',
43+
'name' => 'नाम',
44+
'departement' => 'विभाग',
45+
'email' => 'ईमेल',
46+
'status' => 'स्थिति',
47+
'search-using-mail' => 'मेल का उपयोग करके खोजें',
48+
'about-me' => 'मेरे बारे में',
49+
'created-at' => 'बनाया गया',
50+
'updated-at' => 'अपडेट किया गया',
51+
'select-all' => 'सभी का चयन करें',
52+
'delete' => 'हटाएँ',
53+
'set-inactive' => 'निष्क्रिय करें',
54+
'set-active' => 'सक्रिय करें',
55+
'block' => 'अवरोधित करें',
56+
'unblock' => 'अवरोध हटाएँ',
57+
'make-admin' => 'व्यवस्थापक बनाएँ',
58+
'revoke-admin-power' => 'व्यवस्थापक अधिकार रद्द करें',
59+
'create-new-conversation' => 'नई बातचीत बनाएँ',
60+
'action' => 'कार्यवाही',
61+
'departments' => 'विभागों',
62+
'add-and-delete-department' => 'विभाग जोड़ें और हटाएँ',
63+
'add-department' => 'विभाग जोड़ें',
64+
'department' => 'विभाग',
65+
'delete-department' => 'विभाग हटाएँ',
66+
'timezone' => 'समय क्षेत्र',
67+
'update-timezone' => 'समय क्षेत्र अपडेट करें',
68+
'file-upload-path' => 'फ़ाइल अपलोड पथ',
69+
'place-it-outside-the-webroot-means-that-the-files-will-not-be-publicly-exposed' => 'इसे वेबरूट के बाहर रखना यह मान लें कि फ़ाइलें सार्वजनिक रूप से प्रकट नहीं होंगी।',
70+
'notifications' => 'सूचनाएं',
71+
'activities' => 'गतिविधियां',
72+
'superadmin' => 'सुपर व्यवस्थापक',
73+
'change-password' => 'पासवर्ड बदलें',
74+
'are-you-sure-you-want-to-delete-activities' => 'Are you sure you want to delete <strong>Activities</strong>',
75+
];

lang/hi/login.php

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Validation Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines contain the default error messages used by
11+
| the validator class. Some of these rules have multiple versions such
12+
| as the size rules. Feel free to tweak each of these messages here.
13+
|
14+
*/
15+
16+
'lang00000' => 'साइन इन करें',
17+
'lang00001' => 'नीचे दिए गए फ़ॉर्म का उपयोग करके साइन इन करें',
18+
'lang00002' => 'ईमेल',
19+
'lang00003' => 'पासवर्ड',
20+
'lang00004' => 'मुझे याद रखें',
21+
'lang00005' => 'साइन ऑन करें',
22+
'lang00006' => 'लॉग इन करें',
23+
'lang00007' => 'कोई अकाउंट नहीं है',
24+
'lang00008' => 'रजिस्ट्रेशन करने में एक मिनट से भी कम समय लगता है लेकिन इससे आपको अपने ऑर्डरों पर पूर्ण नियंत्रण मिलता है।',
25+
'lang00009' => 'पहला नाम',
26+
'lang00010' => 'कृपया पहला नाम दर्ज करें',
27+
'lang00011' => 'ईमेल पता',
28+
'lang00012' => 'फ़ोन नंबर',
29+
'lang00013' => 'पासवर्ड',
30+
'lang00014' => 'पासवर्ड की पुष्टि कीजिए',
31+
'lang00015' => 'पहले से ही अकाउंट है',
32+
'lang00016' => 'अंतिम नाम',
33+
'lang00017' => 'कृपया अंतिम नाम दर्ज करें',
34+
'lang00018' => 'कृपया वैध ईमेल पता दर्ज करें!',
35+
'lang00019' => 'कृपया अपना फ़ोन नंबर दर्ज करें!',
36+
'lang00020' => 'कृपया पासवर्ड दर्ज करें!',
37+
'lang00021' => 'पासवर्ड मेल नहीं खाते!',
38+
'lang00022' => 'पहले से ही अकाउंट है',
39+
40+
];

resources/views/admin/activities.blade.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
<div class="col-md-10 pt-3">
1717
<div class="card shadow-sm rounded bg-white mb-3">
1818
<div class="card-header border-bottom p-3">
19-
<h6 class="m-0 float-left">Activitie's</h6>
19+
<h6 class="m-0 float-left">{{ __("lang.activities") }}</h6>
2020
<div class="btn-group float-right">
2121
<button type="button" class="btn btn-sm rounded" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2222
<i class="mdi mdi-dots-vertical"></i>
2323
</button>
2424
<div class="dropdown-menu dropdown-menu-right">
25-
<button class="dropdown-item" type="button" onclick="delete_activity()"></i> Delete</button>
26-
<button class="dropdown-item" type="button" onclick="SelectAll()"></i> Select All</button>
25+
<button class="dropdown-item" type="button" onclick="delete_activity()"></i> {{ __("lang.delete") }}</button>
26+
<button class="dropdown-item" type="button" onclick="SelectAll()"></i> {{ __("lang.select-all") }}</button>
2727
</div>
2828
</div>
2929
<select class="pages float-right mr-3">
@@ -51,7 +51,7 @@
5151
</button>
5252
<div class="dropdown-menu dropdown-menu-right">
5353
<input type="hidden" class="act{{ $info->id }}" id="id" value="{{ $info->id }}" />
54-
<button class="dropdown-item" type="button" ajax_post data-msg="Are you sure you want to delete activities?" action="/activity/delete" form="act{{ $info->id }}" ><i class="mdi mdi-delete"></i> Delete</button>
54+
<button class="dropdown-item" type="button" ajax_post data-msg="Are you sure you want to delete activities?" action="/activity/delete" form="act{{ $info->id }}" ><i class="mdi mdi-delete"></i> {{ __("lang.delete") }}</button>
5555
</div>
5656
</div>
5757
<br />
@@ -67,7 +67,7 @@
6767
@section('script')
6868
<script>
6969
function delete_activity(){
70-
kchat_alert("Are you sure you want to delete <strong>Activities</strong>?",(function(){__post('/activity/delete',{'ids':getSelectedID()});}));
70+
kchat_alert("{{ __("lang.are-you-sure-you-want-to-delete-activities") }}",(function(){__post('/activity/delete',{'ids':getSelectedID()});}));
7171
}
7272
</script>
7373
@endsection

resources/views/admin/conversations.blade.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@extends('admin.master')
22

3-
@section('title', 'Conversations\'s')
3+
@section('title', __("lang.conversations"))
44

55
@section('header')
66
<link href="css/bootstrap.min.css" rel="stylesheet">
@@ -38,8 +38,8 @@
3838
</svg>
3939
</a>
4040
<div class="dropdown-menu dropdown-menu-right">
41-
<a class="dropdown-item" onclick="SelectAll()" >Select All</a>
42-
<a class="dropdown-item" onclick="delete_convos()" >Delete</a>
41+
<a class="dropdown-item" onclick="SelectAll()" >{{ __("lang.select-all") }}</a>
42+
<a class="dropdown-item" onclick="delete_convos()" >{{ __("lang.delete") }}</a>
4343
</div>
4444
</div>
4545
</th>
@@ -48,10 +48,10 @@
4848
<thead>
4949
<tr>
5050
<th>#</th>
51-
<th>Name</th>
52-
<th>Members</th>
51+
<th>{{ __("lang.name") }}</th>
52+
<th>{{ __("lang.members") }}</th>
5353
<th>Created at</th>
54-
<th>Action</th>
54+
<th>{{ __("lang.action") }}</th>
5555
</tr>
5656
</thead>
5757
<tbody id="member_table" >
@@ -71,7 +71,7 @@
7171
</svg>
7272
</a>
7373
<div class="dropdown-menu dropdown-menu-right">
74-
<a class="dropdown-item" data-convoid="{{ $conversation->id }}" onclick="delete_convo({{ $conversation->id }});" >Delete</a>
74+
<a class="dropdown-item" data-convoid="{{ $conversation->id }}" onclick="delete_convo({{ $conversation->id }});" >{{ __("lang.delete") }}</a>
7575
</div>
7676
</div>
7777
</td>

0 commit comments

Comments
 (0)