Skip to content

Commit

Permalink
Merge pull request #8 from torrix/laravel-10
Browse files Browse the repository at this point in the history
Update for Laravel 10
  • Loading branch information
mattfletcher authored Aug 6, 2023
2 parents bf6f402 + f0a6600 commit 8abc357
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ composer.lock
.DS_Store
Thumbs.db
.phpunit.result.cache
/package-lock.json
/node_modules
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# UIkit starter template for Laravel 9
# UIkit starter template for Laravel
## Including authentication scaffolding for Laravel Fortify

![](https://torrix.uk/laravel-uikit.jpg)

Out of the box, Laravel 9 ships with a default welcome template built with
Out of the box, Laravel ships with a default welcome template built with
[Tailwind CSS](https://tailwindcss.com). On top of the base framework,
[Laravel JetStream](https://jetstream.laravel.com/) provides two user
interfaces (your choice of Laravel Livewire or InertiaJS) for login and
Expand Down Expand Up @@ -52,7 +52,7 @@ on how to deploy the project on a live system.

### Prerequisites

To begin, you'll need a **fresh** install of Laravel 9. **Adding this to an
To begin, you'll need a **fresh** install of Laravel 10+. **Adding this to an
existing project is not recommended and may cause issues**. For full
instructions on installing Laravel, refer to the
[Laravel installation docs](https://laravel.com/docs/9.x/installation), but
Expand Down
3 changes: 2 additions & 1 deletion app/LaravelUikitServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public function boot(): void

$this->publishes(
[
__DIR__ . '/../webpack.mix.js' => 'webpack.mix.js',
__DIR__ . '/../package.json' => 'package.json',
__DIR__ . '/../vite.config.js' => 'vite.config.js',
__DIR__ . '/../resources/js' => resource_path('js'),
__DIR__ . '/../resources/sass' => resource_path('sass'),
__DIR__ . '/../resources/views/welcome.blade.php' => resource_path('views/welcome.blade.php'),
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "torrix/laravel-uikit",
"description": "UIkit starter template for Laravel 9",
"description": "UIkit starter template for Laravel",
"minimum-stability": "stable",
"keywords": [
"laravel",
Expand All @@ -16,9 +16,8 @@
}
],
"require": {
"php": "^8.0.2",
"illuminate/support": "^9.0",
"uikit/uikit": "^v3.11.1"
"php": "^8.2",
"illuminate/support": "^10.0"
},
"extra": {
"laravel": {
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"axios": "^1.1.2",
"laravel-vite-plugin": "^0.7.5",
"sass": "^1.64.2",
"uikit": "^3.16.24",
"vite": "^4.0.0"
}
}
11 changes: 3 additions & 8 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
window._ = require('lodash');
import UIkit from 'uikit';
import Icons from 'uikit/dist/js/uikit-icons';

window.UIkit = require("../../vendor/uikit/uikit");
window.Icons = require("../../vendor/uikit/uikit/dist/js/uikit-icons");

UIkit.use(window.Icons);

window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
UIkit.use(Icons)
6 changes: 3 additions & 3 deletions resources/sass/app.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is how you might override UIkit default variables
$global-primary-background: #491165;

@import "../../vendor/uikit/uikit/src/scss/variables-theme.scss";
@import "../../vendor/uikit/uikit/src/scss/mixins-theme.scss";
@import "../../vendor/uikit/uikit/src/scss/uikit-theme.scss";
@import "uikit/src/scss/variables-theme.scss";
@import "uikit/src/scss/mixins-theme.scss";
@import "uikit/src/scss/uikit-theme.scss";
4 changes: 2 additions & 2 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title>{{ config('app.name', 'Laravel') }}</title>

<!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
@vite(['resources/sass/app.scss'])
</head>
<body>
<div id="app">
Expand Down Expand Up @@ -119,6 +119,6 @@ class="uk-icon-button" data-uk-icon="github"></a>
</div>
</footer>
</div>
<script src="{{ asset('js/app.js') }}" defer></script>
@vite(['resources/js/app.js'])
</body>
</html>
4 changes: 2 additions & 2 deletions resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@section('content')
<div class="uk-section uk-section-small uk-section-muted">
<div class="uk-container">
<h1 class="uk-heading-divider">UIkit starter template for Laravel 9</h1>
<h1 class="uk-heading-divider">UIkit starter template for Laravel</h1>
<p>
Congratulations, you've successfully installed the UIkit starter template for Laravel 9. Have a browse
Congratulations, you've successfully installed the UIkit starter template for Laravel. Have a browse
through the links below for inspiration on how to work with Laravel, UIkit, and Vue.js. Happy coding!
</p>
<div class="uk-grid" data-uk-grid data-uk-height-match="target:.uk-card">
Expand Down
14 changes: 14 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
],
});
4 changes: 0 additions & 4 deletions webpack.mix.js

This file was deleted.

0 comments on commit 8abc357

Please sign in to comment.