This file contains hidden or 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
import { defineConfig } from 'vite'; | |
import laravel from 'laravel-vite-plugin'; | |
export default defineConfig({ | |
plugins: [ | |
laravel({ | |
input: 'resources/js/app.jsx', | |
refresh: [ | |
'resources/js/app.jsx', | |
'front-end-client/src/**', | |
'resources/components/react.blade.php', |
This file contains hidden or 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
<?php | |
trait HandlesContentType { | |
protected function getContentType(string $name) : string | |
{ | |
return match($name){ | |
Str::endsWith($name, '.css') => 'text/css', | |
Str::endsWith($name, '.js') => 'text/javascript', | |
Str::endsWith($name, '.html') => 'text/html', | |
default => 'text/plain', |
This file contains hidden or 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
import "@testing-library/jest-dom"; | |
import { render, act, screen } from "@testing-library/react"; | |
import Accordian from './Accordian'; | |
describe("Accordion", () => { | |
it("opens", () => { | |
const { getByText } = render( | |
<Accordion question="Question" answer="Answer" /> | |
); | |
act(() => { |
This file contains hidden or 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
import './bootstrap'; | |
import '../css/app.css'; | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { createInertiaApp } from '@inertiajs/inertia-react'; | |
import { InertiaProgress } from '@inertiajs/progress'; | |
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; | |
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel'; |
This file contains hidden or 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
const defaultTheme = require('tailwindcss/defaultTheme'); | |
/** @type {import('tailwindcss').Config} */ | |
module.exports = { | |
content: [ | |
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', | |
'./storage/framework/views/*.php', | |
'./resources/views/**/*.blade.php', | |
'./resources/js/**/*.jsx', | |
//NEW - Check tsx files for tailwind styles |
This file contains hidden or 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
<?php | |
class SomeCommand extends Command { | |
public function info($message){ | |
logger()->info($message); | |
parent::info($message); | |
} | |
} |
This file contains hidden or 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
<?php | |
namespace App\Http\Controllers; | |
use App\Services\PmIdentityService; | |
use Aws\S3\S3Client; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Gate; | |
use Illuminate\Support\Str; | |
use InvalidArgumentException; |
This file contains hidden or 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
<?php | |
return [ | |
'default' => env('DB_CONNECTION', 'pgsql'), | |
//Other drivers removed for clarity | |
'mysql' => [ | |
'readonly' => true, | |
'host' => env('WPDB_HOST', '127.0.0.1'), | |
'driver' => 'mysql', | |
'url' => env('WPDB_URL'), |
This file contains hidden or 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
{ | |
"name": "vendor/site", | |
"type": "project", | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "https://wpackagist.org", | |
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"] | |
} | |
], |
This file contains hidden or 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
<?php | |
$script = wp_scripts()->query('react',true); |