These scripts can be run with the following commands, by a super user. This installs a lot of stuff, read first.
You can add -s -- --dry-run
to then end to do a dry run first.
These are tested on an ec2 instance running vscode remote
These scripts can be run with the following commands, by a super user. This installs a lot of stuff, read first.
You can add -s -- --dry-run
to then end to do a dry run first.
These are tested on an ec2 instance running vscode remote
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\Artisan; | |
class Name extends Command | |
{ | |
protected $signature = 'something'; | |
protected $description = 'Calls other commands'; |
import { defineConfig } from 'vite'; | |
import laravel from 'laravel-vite-plugin'; | |
import vue from '@vitejs/plugin-vue2' | |
export default defineConfig({ | |
plugins: [ | |
laravel([ | |
'resources/js/app.js', | |
]), | |
vue({ |
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', |
<?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', |
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(() => { |
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'; |
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 |
<?php | |
class SomeCommand extends Command { | |
public function info($message){ | |
logger()->info($message); | |
parent::info($message); | |
} | |
} |
<?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; |