Skip to content

Commit 80481dd

Browse files
author
Ruchit Patel
authored
Merge pull request #2 from viralsolani/master
Pull request
2 parents 179c24b + 81c9b0d commit 80481dd

Some content is hidden

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

59 files changed

+1477
-1288
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# laravel-adminpanel
2-
[![License](https://img.shields.io/badge/License-MIT-red.svg)](https://github.com/viralsolani/laravel-adminpanel/blob/master/LICENSE.txt)
3-
[![StyleCI](https://styleci.io/repos/30171828/shield?style=plastic)](https://styleci.io/repos/105789824/shield?style=plastic)
2+
[![GitHub license](https://img.shields.io/github/license/viralsolani/laravel-adminpanel.svg?style=plastic)](https://github.com/viralsolani/laravel-adminpanel/blob/master/LICENSE.txt)
3+
[![GitHub stars](https://img.shields.io/github/stars/viralsolani/laravel-adminpanel.svg?style=plastic)](https://github.com/viralsolani/laravel-adminpanel/stargazers)
4+
[![GitHub forks](https://img.shields.io/github/forks/viralsolani/laravel-adminpanel.svg?style=plastic)](https://github.com/viralsolani/laravel-adminpanel/network)
5+
[![GitHub issues](https://img.shields.io/github/issues/viralsolani/laravel-adminpanel.svg?style=plastic)](https://github.com/viralsolani/laravel-adminpanel/issues)
6+
![StyleCI](https://img.shields.io/badge/styleCI-passed-brightgreen.svg?style=plastic)
47

58

69
## Introduction
@@ -17,7 +20,7 @@ For Laravel 5 Boilerplate Features : [Features](https://github.com/rappasoft/lar
1720
* Email Template Module
1821
* Blog Module
1922
* FAQ Module
20-
* API Boilerplate - Coming Soon.
23+
* API Boilerplate.
2124

2225
Give your project a Head Start by using [laravel-adminpanel](https://github.com/viralsolani/laravel-adminpanel).
2326

@@ -64,7 +67,7 @@ Install the javascript dependencies using npm
6467

6568
Compile the dependencies
6669

67-
npm run development
70+
npm run development
6871

6972
Start the local development server
7073

@@ -83,6 +86,27 @@ You can now access the server at http://localhost:8000
8386
php artisan key:generate
8487
php artisan jwt:generate
8588

89+
## Logging In
90+
91+
`php artisan db:seed` adds three users with respective roles. The credentials are as follows:
92+
93+
* Admin Istrator: `admin@admin.com`
94+
* Backend User: `executive@executive.com`
95+
* Default User: `user@user.com`
96+
97+
Password: `1234`
98+
99+
## ScreenShots
100+
101+
## Dashboard
102+
![Screenshot](screenshots/dashboard.png)
103+
104+
## User Listing
105+
![Screenshot](screenshots/users.png)
106+
107+
## Settings
108+
![Screenshot](screenshots/settings.png)
109+
86110
## Issues
87111

88112
If you come across any issues please report them [here](https://github.com/viralsolani/laravel-adminpanel/issues).
@@ -92,4 +116,4 @@ Feel free to create any pull requests for the project. For propsing any new chan
92116

93117
## License
94118

95-
[MIT LICENSE](https://github.com/viralsolani/laravel-adminpanel/blob/master/LICENSE.txt)
119+
[MIT LICENSE](https://github.com/viralsolani/laravel-adminpanel/blob/master/LICENSE.txt)

app/Http/Breadcrumbs/Backend/Backend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
require __DIR__.'/Access/User.php';
99
require __DIR__.'/Access/Role.php';
1010
require __DIR__.'/Access/Permission.php';
11-
require __DIR__.'/CMS_Page.php';
11+
require __DIR__.'/Page.php';
1212
require __DIR__.'/Email_Template.php';
1313
require __DIR__.'/Setting.php';
1414
require __DIR__.'/Blog_Category.php';

app/Http/Breadcrumbs/Backend/CMS_Page.php

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
Breadcrumbs::register('admin.pages.index', function ($breadcrumbs) {
4+
$breadcrumbs->parent('admin.dashboard');
5+
$breadcrumbs->push(trans('menus.backend.pages.management'), route('admin.pages.index'));
6+
});
7+
8+
Breadcrumbs::register('admin.pages.create', function ($breadcrumbs) {
9+
$breadcrumbs->parent('admin.pages.index');
10+
$breadcrumbs->push(trans('menus.backend.pages.create'), route('admin.pages.create'));
11+
});
12+
13+
Breadcrumbs::register('admin.pages.edit', function ($breadcrumbs, $id) {
14+
$breadcrumbs->parent('admin.pages.index');
15+
$breadcrumbs->push(trans('menus.backend.pages.edit'), route('admin.pages.edit', $id));
16+
});

app/Http/Controllers/Api/V1/APIController.php

Lines changed: 80 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function getStatusCode()
3333
*
3434
* @param [type] $statusCode [description]
3535
*
36-
* @return mix
36+
* @return statuscode
3737
*/
3838
public function setStatusCode($statusCode)
3939
{
@@ -42,37 +42,13 @@ public function setStatusCode($statusCode)
4242
return $this;
4343
}
4444

45-
/**
46-
* responsd not found.
47-
*
48-
* @param string $message
49-
*
50-
* @return mix
51-
*/
52-
public function respondNotFound($message = 'Not Found')
53-
{
54-
return $this->setStatusCode(IlluminateResponse::HTTP_NOT_FOUND)->respondWithError($message);
55-
}
56-
57-
/**
58-
* Respond with error.
59-
*
60-
* @param string $message
61-
*
62-
* @return mix
63-
*/
64-
public function respondInternalError($message = 'Internal Error')
65-
{
66-
return $this->setStatusCode('500')->respondWithError($message);
67-
}
68-
6945
/**
7046
* Respond.
7147
*
7248
* @param array $data
7349
* @param array $headers
7450
*
75-
* @return mix
51+
* @return \Illuminate\Http\JsonResponse
7652
*/
7753
public function respond($data, $headers = [])
7854
{
@@ -85,7 +61,7 @@ public function respond($data, $headers = [])
8561
* @param Paginator $items
8662
* @param array $data
8763
*
88-
* @return mix
64+
* @return \Illuminate\Http\JsonResponse
8965
*/
9066
public function respondWithPagination($items, $data)
9167
{
@@ -101,12 +77,38 @@ public function respondWithPagination($items, $data)
10177
return $this->respond($data);
10278
}
10379

80+
/**
81+
* Respond Created.
82+
*
83+
* @param string $message
84+
*
85+
* @return \Illuminate\Http\JsonResponse
86+
*/
87+
public function respondCreated($data)
88+
{
89+
return $this->setStatusCode(201)->respond([
90+
'data' => $data,
91+
]);
92+
}
93+
94+
/**
95+
* Respond Created with data.
96+
*
97+
* @param string $message
98+
*
99+
* @return \Illuminate\Http\JsonResponse
100+
*/
101+
public function respondCreatedWithData($data)
102+
{
103+
return $this->setStatusCode(201)->respond($data);
104+
}
105+
104106
/**
105107
* respond with error.
106108
*
107109
* @param $message
108110
*
109-
* @return mix
111+
* @return \Illuminate\Http\JsonResponse
110112
*/
111113
public function respondWithError($message)
112114
{
@@ -119,17 +121,61 @@ public function respondWithError($message)
119121
}
120122

121123
/**
122-
* Respond Created.
124+
* responsd not found.
123125
*
124126
* @param string $message
125127
*
126-
* @return mix
128+
* @return \Illuminate\Http\JsonResponse
127129
*/
128-
public function respondCreated($message)
130+
public function respondNotFound($message = 'Not Found')
129131
{
130-
return $this->setStatusCode(201)->respond([
131-
'message' => $message,
132-
]);
132+
return $this->setStatusCode(IlluminateResponse::HTTP_NOT_FOUND)->respondWithError($message);
133+
}
134+
135+
/**
136+
* Respond with error.
137+
*
138+
* @param string $message
139+
*
140+
* @return \Illuminate\Http\JsonResponse
141+
*/
142+
public function respondInternalError($message = 'Internal Error')
143+
{
144+
return $this->setStatusCode(500)->respondWithError($message);
145+
}
146+
147+
/**
148+
* Respond with unauthorized.
149+
*
150+
* @param string $message
151+
*
152+
* @return \Illuminate\Http\JsonResponse
153+
*/
154+
protected function respondUnauthorized($message = 'Unauthorized')
155+
{
156+
return $this->setStatusCode(401)->respondWithError($message);
157+
}
158+
159+
/**
160+
* Respond with forbidden.
161+
*
162+
* @param string $message
163+
*
164+
* @return \Illuminate\Http\JsonResponse
165+
*/
166+
protected function respondForbidden($message = 'Forbidden')
167+
{
168+
return $this->setStatusCode(403)->respondWithError($message);
169+
}
170+
171+
/**
172+
* Respond with no content.
173+
*
174+
* @return \Illuminate\Http\JsonResponse
175+
*/
176+
protected function respondWithNoContent()
177+
{
178+
return $this->setStatusCode(204)->respond(null);
133179
}
134180

135181
/**

0 commit comments

Comments
 (0)