Skip to content
This repository was archived by the owner on Apr 1, 2021. It is now read-only.

Commit 160b245

Browse files
committed
Merge branch 'release/0.2.0'
2 parents 3286a1b + c54336e commit 160b245

File tree

28 files changed

+1384
-670
lines changed

28 files changed

+1384
-670
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ PUSHER_APP_CLUSTER=mt1
3737

3838
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
3939
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
40+
41+
# API_URL=
42+
# API_USERNAME=
43+
# API_PASSWORD=

.eslintrc

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"extends": [
33
"standard",
4-
"plugin:vue/strongly-recommended"
4+
"plugin:vue/strongly-recommended",
5+
"plugin:unicorn/recommended"
6+
],
7+
"plugins": [
8+
"unicorn"
59
],
610
"env": {
711
"browser": true
@@ -41,6 +45,18 @@
4145
}
4246
}],
4347
"vue/require-default-prop": "off",
44-
"vue/require-prop-types": "off"
45-
}
48+
"vue/require-prop-types": "off",
49+
"vue/prop-name-casing": ["error", "camelCase"],
50+
"unicorn/catch-error-name": ["error", {
51+
"name": "err"
52+
}]
53+
},
54+
"overrides": [{
55+
"files": ["resources/assets/js/coreui/**/*.vue"],
56+
"rules": {
57+
"unicorn/filename-case": ["error", {
58+
"case": "pascalCase"
59+
}]
60+
}
61+
}]
4662
}

README.md

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,77 @@
22

33
> Laravel + CoreUI + Vue Boilerplate
44
5+
[![GitHub version](https://badge.fury.io/gh/adenvt%2Flaravel-coreui-vue.svg)](https://badge.fury.io/gh/adenvt%2Flaravel-coreui-vue)
6+
[![Greenkeeper badge](https://badges.greenkeeper.io/adenvt/laravel-coreui-vue.svg)](https://greenkeeper.io/)
7+
8+
## What's inside
9+
* [Laravel][laravel] 5.6, A PHP framework for web artisans
10+
* [Core UI][coreui] for Vue, Free Bootstrap Admin Template
11+
* Usefull library: [Axios][axios], [jQuery][jquery], [Moment.js][moment], [Lodash][lodash]
12+
* [Vue Router][vue-router] and [Vuex][vuex], set out of the box
13+
* Notification using [Vue-SweatAlert2][vue-sweatalert2] and [Vue-Notification][vue-notification]
14+
* Loading spinner with [Vue Loading Spinner][vue-loading-spinner]
15+
* Quick deployment with [Docker Compose][docker-compose] [TODO]
16+
17+
## Requirement
18+
* **PHP** >= 7.1.3
19+
* OpenSSL PHP Extension
20+
* PDO PHP Extension
21+
* Mbstring PHP Extension
22+
* Tokenizer PHP Extension
23+
* XML PHP Extension
24+
* Ctype PHP Extension
25+
* JSON PHP Extension
26+
* **Node** >= 8.9.4
27+
* **NPM** >= 5.6.0
28+
* For Ubuntu, require `apt-get install libpng16-dev`, [see](https://github.com/imagemin/imagemin-mozjpeg/issues/28)
29+
530
## How to Install
6-
* Clone this repository
7-
* Install depencies
31+
* [Download][download] and extract this repository
32+
* Install all depencies
833
```bash
9-
$ composer install
10-
$ npm install
34+
cd /path/to/folder
35+
36+
composer install
37+
npm install
1138
```
1239
* Copy `.env` file
1340
```bash
14-
$ cp -r .env.example .env
41+
cp -r .env.example .env
1542
```
1643
* Generate Application key
1744
```bash
18-
$ php artisan key:generate
45+
php artisan key:generate
1946
```
20-
* Add write permission
47+
* Add write permission (Unix)
2148
```bash
22-
$ chmod -R go+w storage bootstrap/cache
49+
chmod -R go+w storage bootstrap/cache
50+
```
51+
* Compile Static Asset
52+
```bash
53+
## for Development
54+
npm run dev
55+
56+
## for Production
57+
npm run prod
58+
59+
### for Development with HMR (Hot Module Replacement)
60+
npm run hot
2361
```
2462

2563
## License
2664
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
65+
66+
[download]: https://github.com/adenvt/laravel-coreui-vue/archive/0.2.0.zip
67+
[laravel]: https://laravel.com
68+
[coreui]: https://coreui.io
69+
[axios]: https://github.com/axios/axios
70+
[jquery]: https://jquery.com/
71+
[lodash]: https://lodash.com/
72+
[moment]: https://momentjs.com/
73+
[vue-router]: https://router.vuejs.org/
74+
[vuex]: https://vuex.vuejs.org/
75+
[vue-sweatalert2]: https://github.com/avil13/vue-sweetalert2
76+
[vue-notification]: http://vue-notification.yev.io/
77+
[vue-loading-spinner]: https://nguyenvanduocit.github.io/vue-loading-spinner/
78+
[docker-compose]: https://docs.docker.com/compose/

app/Http/Kernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class Kernel extends HttpKernel
5151
* @var array
5252
*/
5353
protected $routeMiddleware = [
54+
// 'auth' => \App\Http\Middleware\Authenticate::class,
5455
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
5556
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
5657
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,

app/Http/Middleware/Authenticate.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace App\Http\Middleware;
4+
5+
use Closure;
6+
7+
class Authenticate
8+
{
9+
/**
10+
* Handle an incoming request.
11+
*
12+
* @param \Illuminate\Http\Request $request
13+
* @param \Closure $next
14+
* @return mixed
15+
*/
16+
public function handle($request, Closure $next)
17+
{
18+
if (!session()->has('auth') && !isset(session('auth')->access_token)) {
19+
$data = [
20+
'status' => 401,
21+
'success' => false,
22+
'message' => 'Token not provided',
23+
];
24+
25+
return response()->json($data, $data['status'], 401);
26+
}
27+
28+
return $next($request);
29+
}
30+
}

app/User.php renamed to app/Model/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace App;
3+
namespace App\Model;
44

55
use Illuminate\Notifications\Notifiable;
66
use Illuminate\Foundation\Auth\User as Authenticatable;

app/Providers/AppServiceProvider.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Providers;
44

5+
// use GuzzleHttp\Client;
56
use Illuminate\Support\ServiceProvider;
67

78
class AppServiceProvider extends ServiceProvider
@@ -23,6 +24,25 @@ public function boot()
2324
*/
2425
public function register()
2526
{
26-
//
27+
28+
// $this->app->singleton(Client::class, function ($app) {
29+
// $headers = [
30+
// 'Content-Type' => 'application/json',
31+
// 'Accept' => 'application/json',
32+
// ];
33+
34+
// if (session()->has('auth') && isset(session('auth')->access_token)) {
35+
// $headers['Authorization'] = 'Bearer ' . session('auth')->access_token;
36+
// }
37+
38+
// return new Client([
39+
// 'base_uri' => config('services.api.url'),
40+
// 'headers' => $headers,
41+
// 'auth' => [
42+
// config('services.api.username'),
43+
// config('services.api.password'),
44+
// ],
45+
// ]);
46+
// });
2747
}
2848
}

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "laravel/laravel",
3-
"description": "The Laravel Framework.",
4-
"keywords": ["framework", "laravel"],
2+
"name": "adenvt/laravel-coreui-vue",
3+
"description": "Laravel + CoreUI + Vue Boilerplate",
4+
"keywords": ["framework", "boilerplate", "laravel", "coreui", "vue"],
55
"license": "MIT",
66
"type": "project",
77
"require": {

0 commit comments

Comments
 (0)