-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from mertasan/nova4
Nova 4 Compatibility
- Loading branch information
Showing
15 changed files
with
123 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//! moment.js | ||
|
||
//! moment.js locale configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"/js/app.js": "/js/app.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"/dist/js/app.js": "/dist/js/app.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const mix = require('laravel-mix'); | ||
const webpack = require('webpack'); | ||
|
||
class NovaExtension { | ||
name() { | ||
return 'nova-extension' | ||
} | ||
|
||
register(name) { | ||
this.name = name | ||
} | ||
|
||
webpackPlugins() { | ||
return new webpack.ProvidePlugin({ | ||
_: 'lodash', | ||
Errors: 'form-backend-validation' | ||
}) | ||
} | ||
|
||
webpackConfig(webpackConfig) { | ||
webpackConfig.externals = { | ||
vue: 'Vue', | ||
} | ||
|
||
webpackConfig.output = { | ||
uniqueName: this.name, | ||
} | ||
} | ||
} | ||
|
||
mix.extend('nova', new NovaExtension()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
Nova.booting((Vue, router) => { | ||
Vue.component('nova-scheduled-jobs', require('./components/Card')) | ||
Vue.component('dispatch-job-modal', require('./components/DispatchJobModal')) | ||
import Card from './components/Card' | ||
import DispatchJobModal from './components/DispatchJobModal' | ||
import Tool from './components/Tool' | ||
|
||
router.addRoutes([{ | ||
name: 'NovaScheduledJobs', | ||
path: '/scheduled-jobs', | ||
component: require('./components/Tool'), | ||
}, ]) | ||
}) | ||
Nova.booting((app, router) => { | ||
app.component('nova-scheduled-jobs', Card) | ||
app.component('dispatch-job-modal', DispatchJobModal) | ||
|
||
Nova.inertia('NovaScheduledJobs', Tool) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import moment from 'moment' | ||
|
||
export default { | ||
|
||
methods: { | ||
|
@@ -8,4 +10,4 @@ export default { | |
|
||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Route; | ||
|
||
Route::get('/scheduled-jobs', function (Request $request) { | ||
return inertia('NovaScheduledJobs'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Llaski\NovaScheduledJobs\Http\Middleware; | ||
|
||
use Closure; | ||
use Illuminate\Http\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class Authorize | ||
{ | ||
public function handle(Request $request, Closure $next): Response | ||
{ | ||
return $next($request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
let mix = require('laravel-mix') | ||
let path = require('path') | ||
|
||
mix.js('resources/js/app.js', 'dist/js') | ||
require('./nova.mix') | ||
|
||
mix.setPublicPath('dist') | ||
.js('resources/js/app.js', 'js') | ||
.vue({ version: 3 }) | ||
.nova('llaski/nova-scheduled-jobs'); |