Skip to content

Commit b985010

Browse files
authored
Merge pull request #46 from felly/master
Adding Laravel Nova 4 Support
2 parents 7f55eae + 871560b commit b985010

32 files changed

+833
-8232
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99

1010
![screenshot 3](3.png)
1111

12+
## Requirements
13+
14+
- `php: ^7.4 | ^8`
15+
- `laravel/nova: ^4`
16+
17+
For Laravel Nova Version 3, please use v1 instead.
18+
1219
## Installation
1320

1421
You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:
@@ -39,6 +46,12 @@ public function tools()
3946
}
4047
```
4148

49+
To publish the configuration use:
50+
51+
```php
52+
php artisan vendor:publish --tag=nova-logs-config
53+
```
54+
4255
### Changelog
4356

4457
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^7.1.3|^8.0",
16+
"php": "^7.3|^8.0",
17+
"laravel/nova": "^4.0",
1718
"arcanedev/log-viewer": "*"
1819
},
1920
"require-dev": {

config/nova-logs.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
return [
4+
'log-viewer' => [
5+
'force_disable_routing' => true, // see https://github.com/PHPJunior/nova-logs/issues/36
6+
],
7+
];

dist/css/tool.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tool.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tool.js.LICENSE.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*!
2+
* @kurkle/color v0.2.1
3+
* https://github.com/kurkle/color#readme
4+
* (c) 2022 Jukka Kurkela
5+
* Released under the MIT License
6+
*/
7+
8+
/*!
9+
* Chart.js v3.9.1
10+
* https://www.chartjs.org
11+
* (c) 2022 Chart.js Contributors
12+
* Released under the MIT License
13+
*/
14+
15+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

nova.mix.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const mix = require('laravel-mix')
2+
const webpack = require('webpack')
3+
const path = require('path')
4+
5+
class NovaExtension {
6+
name() {
7+
return 'nova-extension'
8+
}
9+
10+
register(name) {
11+
this.name = name
12+
}
13+
14+
webpackConfig(webpackConfig) {
15+
webpackConfig.externals = {
16+
vue: 'Vue',
17+
}
18+
19+
webpackConfig.resolve.alias = {
20+
...(webpackConfig.resolve.alias || {}),
21+
'laravel-nova': path.join(
22+
__dirname,
23+
'../../vendor/laravel/nova/resources/js/mixins/packages.js'
24+
),
25+
}
26+
27+
webpackConfig.output = {
28+
uniqueName: this.name,
29+
}
30+
}
31+
}
32+
33+
mix.extend('nova', new NovaExtension())

package.json

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,23 @@
22
"private": true,
33
"scripts": {
44
"dev": "npm run development",
5-
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6-
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7-
"watch-poll": "npm run watch -- --watch-poll",
8-
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
5+
"development": "mix",
6+
"watch": "mix watch",
7+
"watch-poll": "mix watch -- --watch-options-poll=1000",
8+
"hot": "mix watch --hot",
99
"prod": "npm run production",
10-
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
11-
"check-format": "prettier --list-different 'resources/**/*.{css,js,vue}'",
12-
"format": "prettier --write 'resources/**/*.{css,js,vue}'",
13-
"lint": "eslint resources/js --fix --ext js,vue"
10+
"production": "mix --production",
11+
"nova:install": "npm --prefix='../../vendor/laravel/nova' ci"
1412
},
1513
"devDependencies": {
16-
"cross-env": "^5.0.0",
17-
"eslint": "^4.19.1",
18-
"eslint-config-prettier": "^2.9.0",
19-
"eslint-plugin-vue": "^4.4.0",
20-
"laravel-mix": "^1.0",
21-
"prettier": "^1.14.0"
22-
},
23-
"dependencies": {
14+
"@vue/compiler-sfc": "^3.2.22",
2415
"animated-scroll-to": "^1.2.2",
25-
"chart.js": "^2.7.2",
26-
"vue": "^2.5.0",
27-
"vue-chartjs": "^3.4.0"
28-
}
16+
"chart.js": "^3.0.0",
17+
"laravel-mix": "^6.0.41",
18+
"postcss": "^8.3.11",
19+
"tailwindcss": "^3.0.24",
20+
"vue-chartjs": "^4.1.2",
21+
"vue-loader": "^16.8.3"
22+
},
23+
"dependencies": {}
2924
}

resources/css/tool.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* Nova Tool CSS */
2+
@tailwind components;
3+
@tailwind utilities;

resources/js/components/Dashboard.vue

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)