A set of snippets I use in Laravel Nova
cd ./nova
yarn
mv webpack.mix.js.dist webpack.mix.js
#!/usr/bin/env bash | |
# | |
# Nginx - new server block | |
# Based on this post: http://clubmate.fi/how-to-make-an-nginx-server-block-manually-or-with-a-shell-script/ | |
# Functions | |
ok() { echo -e '\e[32m'$1'\e[m'; } # Green | |
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; } | |
# Variables |
<?php | |
namespace dkesberg\Facades; | |
use Illuminate\Support\Facades\Facade; | |
class CiconiaFacade extends Facade { | |
protected static function getFacadeAccessor() | |
{ |
/** | |
* Converts a string to a "URL-safe" slug. | |
* Allows for some customization with two optional parameters: | |
* | |
* @param {string} Delimiter used. If not specified, defaults to a dash "-" | |
* @param {array} Adds to the list of non-alphanumeric characters which | |
* will be converted to the delimiter. The default list includes: | |
* ['–', '—', '―', '~', '\\', '/', '|', '+', '\'', '‘', '’', ' '] | |
*/ | |
if (!String.prototype.slugify) { |
/** | |
* Converts a string to a "URL-safe" slug. | |
* Allows for some customization with two optional parameters: | |
* | |
* @param {string} Delimiter used. If not specified, defaults to a dash "-" | |
* @param {array} Adds to the list of non-alphanumeric characters which | |
* will be converted to the delimiter. The default list includes: | |
* ['–', '—', '―', '~', '\\', '/', '|', '+', '\'', '‘', '’', ' '] | |
*/ | |
if (!String.prototype.slugify) { |
#!/usr/bin/env bash | |
set -e | |
set -x | |
# Update server | |
sudo apt update | |
# Install some needed packages | |
sudo apt install php-cli unzip |
public static function form(Form $form): Form | |
{ | |
return $form | |
->schema([ | |
Forms\Components\Grid::make() | |
->schema([ | |
Forms\Components\Card::make() | |
->schema([ | |
Forms\Components\TextInput::make('name') | |
->required() |
array ( | |
'ALL' => 'Albania Lek', | |
'AFN' => 'Afghanistan Afghani', | |
'ARS' => 'Argentina Peso', | |
'AWG' => 'Aruba Guilder', | |
'AUD' => 'Australia Dollar', | |
'AZN' => 'Azerbaijan New Manat', | |
'BSD' => 'Bahamas Dollar', | |
'BBD' => 'Barbados Dollar', | |
'BDT' => 'Bangladeshi taka', |
/* | |
Tailwind - The Utility-First CSS Framework | |
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink), | |
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger). | |
Welcome to the Tailwind config file. This is where you can customize | |
Tailwind specifically for your project. Don't be intimidated by the | |
length of this file. It's really just a big JavaScript object and |
<template> | |
<modal @modal-close="handleClose"> | |
<form | |
@submit.prevent="handleConfirm" | |
slot-scope="props" | |
class="bg-white rounded-lg shadow-lg overflow-hidden" | |
style="width: 460px" | |
> | |
<slot :uppercaseMode="uppercaseMode" :mode="mode"> | |
<div class="p-8"> |