Skip to content

Commit 3cf6e0e

Browse files
committed
init
0 parents  commit 3cf6e0e

File tree

610 files changed

+162254
-0
lines changed

Some content is hidden

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

610 files changed

+162254
-0
lines changed

Diff for: .editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

Diff for: .env.example

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
APP_NAME=Laravel
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
LOG_CHANNEL=stack
8+
9+
DB_CONNECTION=mysql
10+
DB_HOST=127.0.0.1
11+
DB_PORT=3306
12+
DB_DATABASE=laravel
13+
DB_USERNAME=root
14+
DB_PASSWORD=
15+
16+
BROADCAST_DRIVER=log
17+
CACHE_DRIVER=file
18+
QUEUE_CONNECTION=sync
19+
SESSION_DRIVER=file
20+
SESSION_LIFETIME=120
21+
22+
REDIS_HOST=127.0.0.1
23+
REDIS_PASSWORD=null
24+
REDIS_PORT=6379
25+
26+
MAIL_MAILER=smtp
27+
MAIL_HOST=smtp.mailtrap.io
28+
MAIL_PORT=2525
29+
MAIL_USERNAME=null
30+
MAIL_PASSWORD=null
31+
MAIL_ENCRYPTION=null
32+
MAIL_FROM_ADDRESS=null
33+
MAIL_FROM_NAME="${APP_NAME}"
34+
35+
AWS_ACCESS_KEY_ID=
36+
AWS_SECRET_ACCESS_KEY=
37+
AWS_DEFAULT_REGION=us-east-1
38+
AWS_BUCKET=
39+
40+
PUSHER_APP_ID=
41+
PUSHER_APP_KEY=
42+
PUSHER_APP_SECRET=
43+
PUSHER_APP_CLUSTER=mt1
44+
45+
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46+
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

Diff for: .gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
*.css linguist-vendored
3+
*.scss linguist-vendored
4+
*.js linguist-vendored
5+
CHANGELOG.md export-ignore

Diff for: .gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/node_modules
2+
/public/hot
3+
/public/storage
4+
/storage/*.key
5+
/vendor
6+
.env
7+
.idea
8+
.env.backup
9+
.phpunit.result.cache
10+
Homestead.json
11+
Homestead.yaml
12+
npm-debug.log
13+
yarn-error.log

Diff for: .styleci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
php:
2+
preset: laravel
3+
disabled:
4+
- unused_use
5+
finder:
6+
not-name:
7+
- index.php
8+
- server.php
9+
js:
10+
finder:
11+
not-name:
12+
- webpack.mix.js
13+
css: true

Diff for: README.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Laravel 7 Boilerplate
2+
3+
4+
## Features
5+
6+
1. Laravel 7 Framework
7+
2. Laravel-Permission by spatie/laravel-permission
8+
3. Laravel Backup by spatie/laravel-backup
9+
4. Barcode
10+
4. Yajra Datatable by Yajra
11+
5. Laravel Debugbar
12+
6. Laravel Passport Authentication
13+
7. Laravel Ajax CRUD
14+
8. Bootstrap 4
15+
9. Architect Admin Template
16+
10. Multi Auth
17+
11. Admin Panel & User Panel
18+
19+
### Requirements
20+
21+
1. PHP version upto 7.2
22+
2. Laravel version 7
23+
24+
### Installation
25+
26+
1. Clone the project using git clone
27+
2. Copy a fresh .env file from laravel github
28+
3. Update .env file by adding database information like DB_HOST.
29+
4. Go to project root folder.Open git bash or terminal and run composer install
30+
5. Run php artisan key:generate in the terminal
31+
6. Run php artisan migrate // Alternate import db.sql from db folder
32+
33+
### Seeder Class
34+
1. php artisan db:seed to seed all seeder
35+
36+
37+
### Troubleshootings
38+
39+
All Models are in App/Models folder
40+
41+
1. Add 'model' => App\Models\User::class, in config/auth.php providers
42+
2. Change Db port in config/database.php file or change as yours.
43+
3. Try composer composer dump-autoload if need
44+
4. php artisan config:cache if need
45+
5. php artisan clear-compiled if need
46+
47+
### Note*
48+
49+
Don't delete or edit already added permissions to avoid error
50+
51+
52+
### Login
53+
// admin
54+
55+
pass : 123456
56+
57+
// user
58+
59+
pass : 123456
60+
61+
62+
## Credit
63+
64+
1. Laravel 7 Framework
65+
2. Laravel-Permission by spatie/laravel-permission
66+
3. Laravel Backup by spatie/laravel-backup
67+
4. Yajra Datatable by Yajra
68+
5. Barcode by Milon
69+
6. Laravel Debugbar
70+
7. Laravel Passport Authentication
71+
8. Bootstrap 4
72+
9. Architect Admin Template
73+
74+
Screenshot :
75+
76+
![alt text](./screenshot/dashboard.png)
77+
![alt text](./screenshot/permission.png)
78+
![alt text](./screenshot/roles.png)
79+
![alt text](./screenshot/backup.png)
80+
81+
82+
Find me on Linkedin : [My Linkedin profile link](https://www.linkedin.com/in/monjur-morshed-riyadh-6aaba465/) \
83+
Email me : [email protected]

Diff for: app/Console/Kernel.php

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace App\Console;
4+
5+
use Illuminate\Console\Scheduling\Schedule;
6+
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7+
8+
class Kernel extends ConsoleKernel
9+
{
10+
/**
11+
* The Artisan commands provided by your application.
12+
*
13+
* @var array
14+
*/
15+
protected $commands = [
16+
//
17+
];
18+
19+
/**
20+
* Define the application's command schedule.
21+
*
22+
* @param \Illuminate\Console\Scheduling\Schedule $schedule
23+
* @return void
24+
*/
25+
protected function schedule(Schedule $schedule)
26+
{
27+
// $schedule->command('inspire')->hourly();
28+
}
29+
30+
/**
31+
* Register the commands for the application.
32+
*
33+
* @return void
34+
*/
35+
protected function commands()
36+
{
37+
$this->load(__DIR__.'/Commands');
38+
39+
require base_path('routes/console.php');
40+
}
41+
}

Diff for: app/Exceptions/Handler.php

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
3+
namespace App\Exceptions;
4+
5+
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
6+
use Throwable;
7+
8+
class Handler extends ExceptionHandler
9+
{
10+
/**
11+
* A list of the exception types that are not reported.
12+
*
13+
* @var array
14+
*/
15+
protected $dontReport = [
16+
//
17+
];
18+
19+
/**
20+
* A list of the inputs that are never flashed for validation exceptions.
21+
*
22+
* @var array
23+
*/
24+
protected $dontFlash = [
25+
'password',
26+
'password_confirmation',
27+
];
28+
29+
/**
30+
* Report or log an exception.
31+
*
32+
* @param \Throwable $exception
33+
* @return void
34+
*
35+
* @throws \Exception
36+
*/
37+
public function report(Throwable $exception)
38+
{
39+
parent::report($exception);
40+
}
41+
42+
/**
43+
* Render an exception into an HTTP response.
44+
*
45+
* @param \Illuminate\Http\Request $request
46+
* @param \Throwable $exception
47+
* @return \Symfony\Component\HttpFoundation\Response
48+
*
49+
* @throws \Throwable
50+
*/
51+
public function render($request, Throwable $exception)
52+
{
53+
return parent::render($request, $exception);
54+
}
55+
}

Diff for: app/Http/Controllers/Api/Auth/AuthController.php

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Api\Auth;
4+
5+
use App\Http\Controllers\Api\ResponseController as ResponseController;
6+
use App\Models\User;
7+
use Illuminate\Http\Request;
8+
use Illuminate\Support\Facades\Auth;
9+
use GuzzleHttp;
10+
use Validator;
11+
12+
class AuthController extends ResponseController
13+
{
14+
public function login(Request $request)
15+
{
16+
if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
17+
$user = Auth::user();
18+
$success['token'] = $user->createToken('userApiToken')->accessToken;
19+
$success['name'] = $user->name;
20+
return $this->sendResponse($success, 'User logged successfully.');
21+
} else {
22+
return $this->sendError('Unauthorised.', ['error' => 'Unauthorised']);
23+
}
24+
}
25+
26+
/**
27+
* Register api
28+
*
29+
* @return \Illuminate\Http\Response
30+
*/
31+
public function register(Request $request)
32+
{
33+
$validator = Validator::make($request->all(), [
34+
'name' => 'required',
35+
'email' => 'required|email',
36+
'password' => 'required',
37+
'c_password' => 'required|same:password',
38+
]);
39+
if ($validator->fails()) {
40+
return $this->sendError('Unauthorised.', ['error' => $validator->errors()]);
41+
}
42+
$input = $request->all();
43+
$input['password'] = bcrypt($input['password']);
44+
$user = User::create($input);
45+
$success['token'] = $user->createToken('userApiToken')->accessToken;
46+
$success['name'] = $user->name;
47+
return $this->sendResponse($success, 'User Registered successfully.');
48+
}
49+
50+
}

0 commit comments

Comments
 (0)