Skip to content

Pull master #103

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 29 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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 @@ -17,6 +17,7 @@ Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
components.d.ts
/.fleet
/.idea
/.vscode
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
## 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))

## 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)>)

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/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
4 changes: 2 additions & 2 deletions app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function share(Request $request): array
{
return [
...parent::share($request),
'ziggy' => fn() => [
...(new Ziggy)->toArray(),
'ziggy' => fn () => [
...(new Ziggy())->toArray(),
'location' => $request->url(),
],
'auth' => [
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,
],
replace: [
BaseEncryptCookies::class => EncryptCookies::class
Expand Down
57 changes: 57 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// 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.node,
...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