-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiff_01.diff
363 lines (358 loc) · 18.2 KB
/
diff_01.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php
index 4a3ba47..b5fb637 100644
--- a/database/migrations/2014_10_12_000000_create_users_table.php
+++ b/database/migrations/2014_10_12_000000_create_users_table.php
@@ -17,6 +17,7 @@ class CreateUsersTable extends Migration
$table->bigIncrements('id');
$table->string('name');
$table->string('email')->unique();
+ $table->string('profile')->default('noimage.png');
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
diff --git a/database/migrations/2020_07_02_075212_create_categories_table.php b/database/migrations/2020_07_02_075212_create_categories_table.php
index a1826ab..9f36ba6 100644
--- a/database/migrations/2020_07_02_075212_create_categories_table.php
+++ b/database/migrations/2020_07_02_075212_create_categories_table.php
@@ -17,7 +17,8 @@ class CreateCategoriesTable extends Migration
$table->bigIncrements('id');
$table->string('category');
$table->string('slug')->unique();
- $table->timestamps();
+ $table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
+ $table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'));
});
}
diff --git a/database/migrations/2020_07_02_075526_create_posts_table.php b/database/migrations/2020_07_02_075526_create_posts_table.php
index b5a0176..fbe3c79 100644
--- a/database/migrations/2020_07_02_075526_create_posts_table.php
+++ b/database/migrations/2020_07_02_075526_create_posts_table.php
@@ -17,6 +17,7 @@ class CreatePostsTable extends Migration
$table->bigIncrements('id');
$table->string('title');
$table->string('description');
+ $table->string('slug')->unique();
$table->string('feature');
$table->timestamps();
});
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index 91cb6d1..7134d78 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.php
@@ -11,6 +11,7 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
- // $this->call(UsersTableSeeder::class);
+ $this->call(CategoryTableSeeder::class);
+ $this->call(UsersTableSeederd::class);
}
}
diff --git a/public/js/custom.js b/public/js/custom.js
index 6967c71..35fb8ed 100644
--- a/public/js/custom.js
+++ b/public/js/custom.js
@@ -5,7 +5,7 @@ jQuery(document).ready(function() {
}, function() {
$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(200);
});
- // slick slider call
+ // slick slider call
$('.slick_slider').slick({
dots: true,
infinite: true,
@@ -16,7 +16,7 @@ jQuery(document).ready(function() {
autoplaySpeed: 2000,
cssEase: 'linear'
});
- // slick slider2 call
+ // slick slider2 call
$('.slick_slider2').slick({
dots: true,
infinite: true,
@@ -56,4 +56,4 @@ jQuery(window).load(function() { // makes sure the whole site is loaded
$('body').delay(100).css({
'overflow': 'visible'
});
-})
\ No newline at end of file
+})
diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php
index af9fb72..4b8b4f1 100644
--- a/resources/views/admin/dashboard.blade.php
+++ b/resources/views/admin/dashboard.blade.php
@@ -1 +1,245 @@
-helllo {{Auth::user()->name}}
+@extends('admin.layout')
+@section('content')
+ <div id="content">
+ <div class="inner" style="min-height: 700px;">
+ <div class="row">
+ <div class="col-lg-12">
+ <h1> Admin Dashboard </h1>
+ </div>
+ </div>
+ <hr />
+ <!--BLOCK SECTION -->
+ <div class="row">
+ <div class="col-lg-12">
+ <div style="text-align: center;">
+
+ <a class="quick-btn" href="#">
+ <i class="icon-check icon-2x"></i>
+ <span> Products</span>
+ <span class="label label-danger">2</span>
+ </a>
+
+ <a class="quick-btn" href="#">
+ <i class="icon-envelope icon-2x"></i>
+ <span>Messages</span>
+ <span class="label label-success">456</span>
+ </a>
+ <a class="quick-btn" href="#">
+ <i class="icon-signal icon-2x"></i>
+ <span>Profit</span>
+ <span class="label label-warning">+25</span>
+ </a>
+ <a class="quick-btn" href="#">
+ <i class="icon-external-link icon-2x"></i>
+ <span>value</span>
+ <span class="label btn-metis-2">3.14159265</span>
+ </a>
+ <a class="quick-btn" href="#">
+ <i class="icon-lemon icon-2x"></i>
+ <span>tasks</span>
+ <span class="label btn-metis-4">107</span>
+ </a>
+ <a class="quick-btn" href="#">
+ <i class="icon-bolt icon-2x"></i>
+ <span>Tickets</span>
+ <span class="label label-default">20</span>
+ </a>
+ </div>
+ </div>
+ </div>
+ <!--END BLOCK SECTION -->
+ <hr />
+ <!-- COMMENT AND NOTIFICATION SECTION -->
+ <div class="row">
+ <div class="col-lg-7">
+
+ <div class="chat-panel panel panel-success">
+ <div class="panel-heading">
+ <i class="icon-comments"></i>
+ New Comments
+ </div>
+ <div class="panel-body">
+ <ul class="chat">
+ <li class="left clearfix">
+ <span class="chat-img pull-left">
+ <img src="assets/img/1.png" alt="User Avatar" class="img-circle" />
+ </span>
+ <div class="chat-body clearfix">
+ <div class="header">
+ <strong class="primary-font "> Jack Sparrow </strong>
+ <small class="pull-right text-muted label label-danger">
+ <i class="icon-time"></i> 12 mins ago
+ </small>
+ </div>
+ <br />
+ <p>
+ Lorem ipsum dolor sit amet, bibendum ornare dolor, quis ullamcorper ligula sodales.
+ </p>
+ </div>
+ </li>
+ <li class="right clearfix">
+ <span class="chat-img pull-right">
+ <img src="assets/img/2.png" alt="User Avatar" class="img-circle" />
+ </span>
+ <div class="chat-body clearfix">
+ <div class="header">
+ <small class=" text-muted label label-info">
+ <i class="icon-time"></i> 13 mins ago</small>
+ <strong class="pull-right primary-font"> Jhony Deen</strong>
+ </div>
+ <br />
+ <p>
+ Lorem ipsum dolor sit amet, consectetur a dolor, quis ullamcorper ligula sodales.
+ </p>
+ </div>
+ </li>
+ <li class="left clearfix">
+ <span class="chat-img pull-left">
+ <img src="assets/img/3.png" alt="User Avatar" class="img-circle" />
+ </span>
+ <div class="chat-body clearfix">
+ <div class="header">
+ <strong class="primary-font"> Jack Sparrow </strong>
+ <small class="pull-right text-muted label label-warning">
+ <i class="icon-time"></i> 12 mins ago
+ </small>
+ </div>
+ <br />
+ <p>
+ Lorem ipsum dolor sit amet, bibendum ornare dolor, quis ullamcorper ligula sodales.
+ </p>
+ </div>
+ </li>
+ <li class="right clearfix">
+ <span class="chat-img pull-right">
+ <img src="assets/img/4.png" alt="User Avatar" class="img-circle" />
+ </span>
+ <div class="chat-body clearfix">
+ <div class="header">
+ <small class=" text-muted label label-primary">
+ <i class="icon-time"></i> 13 mins ago</small>
+ <strong class="pull-right primary-font"> Jhony Deen</strong>
+ </div>
+ <br />
+ <p>
+ Lorem ipsum dolor sit amet, consectetur a dolor, quis ullamcorper ligula sodales.
+ </p>
+ </div>
+ </li>
+ </ul>
+ </div>
+
+ <div class="panel-footer">
+ <div class="input-group">
+ <input id="btn-input" type="text" class="form-control input-sm" placeholder="Type your comment here..." />
+ <span class="input-group-btn">
+ <button class="btn btn-success btn-sm" id="btn-chat">
+ Send
+ </button>
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-lg-5">
+ <div class="panel panel-danger">
+ <div class="panel-heading">
+ <i class="icon-bell"></i> Notifications Alerts Panel
+ </div>
+ <div class="panel-body">
+ <div class="list-group">
+ <a href="#" class="list-group-item">
+ <i class=" icon-comment"></i> New Comment
+ <span class="pull-right text-muted small"><em> 4 minutes ago</em>
+ </span>
+ </a>
+ <a href="#" class="list-group-item">
+ <i class="icon-twitter"></i> 3 New Followers
+ <span class="pull-right text-muted small"><em> 12 minutes ago</em>
+ </span>
+ </a>
+ <a href="#" class="list-group-item">
+ <i class="icon-envelope"></i> Message Sent
+ <span class="pull-right text-muted small"><em> 27 minutes ago</em>
+ </span>
+ </a>
+ <a href="#" class="list-group-item">
+ <i class="icon-tasks"></i> New Task
+ <span class="pull-right text-muted small"><em>43 minutes ago</em>
+ </span>
+ </a>
+ <a href="#" class="list-group-item">
+ <i class="icon-upload"></i> Server Rebooted
+ <span class="pull-right text-muted small"><em>11:32 AM</em>
+ </span>
+ </a>
+ <a href="#" class="list-group-item">
+ <i class="icon-warning-sign"></i> Server Crashed!
+ <span class="pull-right text-muted small"><em>11:13 AM</em>
+ </span>
+ </a>
+
+ <a href="#" class="list-group-item">
+ <i class="icon-ok"></i> New Order Placed
+ <span class="pull-right text-muted small"><em>9:49 AM</em>
+ </span>
+ </a>
+ <a href="#" class="list-group-item">
+ <i class=" icon-money"></i> Payment Received
+ <span class="pull-right text-muted small"><em>Yesterday</em>
+ </span>
+ </a>
+ </div>
+
+ <a href="#" class="btn btn-default btn-block btn-primary">View All Alerts</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- RIGHT STRIP SECTION -->
+ <div id="right">
+
+
+ <div class="well well-small">
+ <ul class="list-unstyled">
+ <li>Visitor : <span>23,000</span></li>
+ <li>Users : <span>53,000</span></li>
+ <li>Registrations : <span>3,000</span></li>
+ </ul>
+ </div>
+ <div class="well well-small">
+ <span>Profit</span><span class="pull-right"><small>20%</small></span>
+
+ <div class="progress mini">
+ <div class="progress-bar progress-bar-info" style="width: 20%"></div>
+ </div>
+ <span>Sales</span><span class="pull-right"><small>40%</small></span>
+
+ <div class="progress mini">
+ <div class="progress-bar progress-bar-success" style="width: 40%"></div>
+ </div>
+ <span>Pending</span><span class="pull-right"><small>60%</small></span>
+
+ <div class="progress mini">
+ <div class="progress-bar progress-bar-warning" style="width: 60%"></div>
+ </div>
+ <span>Summary</span><span class="pull-right"><small>80%</small></span>
+
+ <div class="progress mini">
+ <div class="progress-bar progress-bar-danger" style="width: 80%"></div>
+ </div>
+ </div>
+ </div>
+ <!-- END RIGHT STRIP SECTION -->
+@endsection
+
+@section('script')
+ <!-- PAGE LEVEL SCRIPTS -->
+ <script src="{{asset('assets/plugins/flot/jquery.flot.js')}}"></script>
+ <script src="{{asset('assets/plugins/flot/jquery.flot.resize.js')}}"></script>
+ <script src="{{asset('assets/plugins/flot/jquery.flot.time.js')}}"></script>
+ <script src="{{asset('assets/plugins/flot/jquery.flot.stack.js')}}"></script>
+ <!-- END PAGE LEVEL SCRIPTS -->
+@endsection
diff --git a/routes/web.php b/routes/web.php
index 4f40f96..9c622e8 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -18,7 +18,7 @@ Route::get('/', function () {
//Auth::routes(['register' => false]);
Route::get('admin', 'Auth\LoginController@showLoginForm')->name('admin');
Route::post('login', 'Auth\LoginController@login')->name('login');
-Route::get('logout', 'Auth\LoginController@logout');
+Route::get('logout', 'Auth\LoginController@logout')->name('logout');
//Reset password
Route::get('password/reset','Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
@@ -32,7 +32,17 @@ Route::get('email/verify/{id}', 'Auth\VerificationController@verify')->name('ver
Route::get('email/resend', 'Auth\VerificationController@resend')->name('verification.resend');
//Admin after login
-Route::get('dashboard','Admin@showDashboard');
+Route::get('/dashboard','Admin@showDashboard')->name('dashboard');
+Route::get('post/all','Post@allPost')->name('post.all');
+Route::get('post/add','Post@addPost')->name('post.add');
+
+//Work with categories
+Route::get('post/category','Post@allCategory')->name('post.category.all');
+Route::get('post/category/getAll','Post@getAllCategory')->name('post.category.getAll');
+Route::get('post/category/getOne/{id}','Post@getOneCategory')->name('post.category.getOne');
+Route::post('post/category/update','Post@updateCategory')->name('post.category.update');
+Route::post('post/category/add','Post@addCategory')->name('post.category.add');
+Route::post('post/category/delete','Post@deleteCategory')->name('post.category.delete');
Route::get('/home', 'HomeController@index')->name('home');