Skip to content

Pull master, improvements #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c5a21ad
default filters fix
connorabbas Jan 7, 2025
bdcbbc8
TS
connorabbas Jan 11, 2025
e2bb615
fixes/cleanup, github actions
connorabbas Jan 11, 2025
69f63fa
pipeline
connorabbas Jan 11, 2025
5278e4d
pipeline, again
connorabbas Jan 11, 2025
01e6fb1
...
connorabbas Jan 11, 2025
5390433
...
connorabbas Jan 11, 2025
652ce65
...
connorabbas Jan 11, 2025
d5d2a90
...
connorabbas Jan 11, 2025
b3a296c
eslint
connorabbas Jan 11, 2025
0114e23
lint
connorabbas Jan 11, 2025
bb1c839
more linting
connorabbas Jan 11, 2025
e3917fe
more linting
connorabbas Jan 11, 2025
c51e343
linting
connorabbas Jan 11, 2025
5575683
last fix?...
connorabbas Jan 11, 2025
46824a7
readme, ignore
connorabbas Jan 11, 2025
58db71d
ignore build path
connorabbas Jan 11, 2025
ef8054c
pint
connorabbas Jan 11, 2025
3884a84
pint fix
connorabbas Jan 11, 2025
b949c34
test pint
connorabbas Jan 11, 2025
8229946
pint
connorabbas Jan 11, 2025
cc1024d
pint test
connorabbas Jan 11, 2025
eee3da9
pint fixes
connorabbas Jan 11, 2025
cf0d450
Merge pull request #102 from connorabbas/develop
connorabbas Jan 11, 2025
9c01782
run all on pull requests
connorabbas Jan 11, 2025
cc11cd3
Merge pull request #104 from connorabbas/develop
connorabbas Jan 11, 2025
fab852d
Merge branch 'master' of github.com:connorabbas/laravel-inertia-prime…
connorabbas Jan 11, 2025
4238138
fixes
connorabbas Jan 11, 2025
b9a8974
empty
connorabbas Jan 11, 2025
752ba61
eslint
connorabbas Jan 11, 2025
623b118
last eslint fixes
connorabbas Jan 11, 2025
3c6bc04
pint
connorabbas Jan 11, 2025
c8f6924
revert
connorabbas Jan 11, 2025
ecbc256
layout change
connorabbas Jan 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Laravel CI

on:
push:
branches: [ "master" ]
pull_request:

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

laravel:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.3'
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, json, libxml, zip

- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"

- name: Install PHP Dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run Pint
run: vendor/bin/pint --test

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'

- name: Install Node Dependencies
run: npm ci

- name: Build Frontend Assets
run: npm run build

- name: Set Environment Variables
run: |
echo "APP_ENV=testing" >> .env
echo "DB_CONNECTION=sqlite" >> .env
echo "DB_DATABASE=database/database.sqlite" >> .env

- name: Generate Application Key
run: php artisan key:generate

- name: Prepare Database
run: |
mkdir -p database
touch database/database.sqlite

- name: Migrate Database
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan migrate:fresh --force

- name: Run Tests
env:
APP_ENV: testing
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
components.d.ts
/.fleet
/.idea
/.vscode
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Laravel, Inertia.js, & PrimeVue Starter Kit

## About
![Static Badge](https://img.shields.io/badge/Laravel%20-%20v11%20-%20%23f9322c) ![Static Badge](https://img.shields.io/badge/Inertia.js%20-%20v2%20-%20%236b46c1) ![Static Badge](https://img.shields.io/badge/Vue.js%20-%20v3.5%20-%20rgb(66%20184%20131)) ![Static Badge](https://img.shields.io/badge/PrimeVue%20-%20v4%20-%20rgb(16%20185%20129))

![Static Badge](https://img.shields.io/badge/Laravel%20-%20v11%20-%20%23f9322c) ![Static Badge](https://img.shields.io/badge/Inertia.js%20-%20v2%20-%20%236b46c1) ![Static Badge](<https://img.shields.io/badge/Vue.js%20-%20v3.5%20-%20rgb(66%20184%20131)>) ![Static Badge](<https://img.shields.io/badge/PrimeVue%20-%20v4%20-%20rgb(16%20185%20129)>)

A basic authentication starter kit using [Laravel](https://laravel.com/docs/master), [Intertia.js](https://inertiajs.com/), and [PrimeVue](https://primevue.org/). An equivalent to using [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze), but with the added benefit of all the PrimeVue components at your disposal.

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Admin/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function create(Request $request): Response
/**
* Handle an incoming new password request.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function store(Request $request): RedirectResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function create(): Response
/**
* Handle an incoming password reset link request.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function store(Request $request): RedirectResponse
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function create(Request $request): Response
/**
* Handle an incoming new password request.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function store(Request $request): RedirectResponse
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/PasswordResetLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function create(): Response
/**
* Handle an incoming password reset link request.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function store(Request $request): RedirectResponse
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Authenticate extends DefaultAuthenticate
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @param Request $request
* @return string|null
*/
protected function redirectTo(Request $request)
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/EnsureAdminEmailIsVerified.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EnsureAdminEmailIsVerified
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
* @param Closure(Request): (Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Requests/Admin/LoginRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function rules(): array
/**
* Attempt to authenticate the request's credentials.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function authenticate(): void
{
Expand All @@ -55,7 +55,7 @@ public function authenticate(): void
/**
* Ensure the login request is not rate limited.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function ensureIsNotRateLimited(): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Requests/Auth/LoginRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function rules(): array
/**
* Attempt to authenticate the request's credentials.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function authenticate(): void
{
Expand All @@ -55,7 +55,7 @@ public function authenticate(): void
/**
* Ensure the login request is not rate limited.
*
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
public function ensureIsNotRateLimited(): void
{
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
)
->withMiddleware(function (Middleware $middleware) {
$middleware->web(append: [
\App\Http\Middleware\HandleInertiaRequests::class,
\Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class,
App\Http\Middleware\HandleInertiaRequests::class,
Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class,
]);
$middleware->alias([
'auth' => Authenticate::class, // override default, for admin redirect
Expand Down
56 changes: 56 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// https://eslint.org/docs/latest/use/configure/
// https://eslint.vuejs.org/user-guide/
// https://typescript-eslint.io/rules/?=recommended

import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginVue from 'eslint-plugin-vue';
import globals from 'globals';
import typescriptEslint from 'typescript-eslint';

export default typescriptEslint.config(
{ ignores: ['*.d.ts', '**/coverage', '**/dist', 'vendor/**', 'public/build/**'] },
{
files: ['**/*.js'],
...eslint.configs.recommended,
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
process: 'readonly',
module: 'readonly',
require: 'readonly',
Ziggy: 'readonly',
window: 'readonly',
},
},
},
{
files: ['**/*.{ts,vue}'],
extends: [
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
],
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
Ziggy: 'readonly',
},
sourceType: 'module',
parserOptions: {
parser: typescriptEslint.parser,
},
},
rules: {
'vue/require-default-prop': 'off',
'vue/attribute-hyphenation': 'off',
'vue/multi-word-component-names': 'off',
'vue/block-lang': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
eslintConfigPrettier
);
Loading
Loading