- Jump down to the plugin
- Try it on Codepen — and heart it!
- Try it on Tailwind Play
- Read my blog post about this plugin - and share it!
and star this gist!
| <?php | |
| // From Marcel Pociot's tweet | |
| // See: https://twitter.com/marcelpociot/status/1389881758267625473 | |
| Str::macro('readDuration', function (... $text) { | |
| $totalWords = str_word_count(implode(' ', $text)); | |
| $minutesToRead = round($totalWords / 200); | |
| return (int) max(1, $minutesToRead); |
| /* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: | |
| Make sure your modal has an id: | |
| <div class="modal" id="myModal" ... > | |
| Then stick this bit of Javascript at at the end of your document: | |
| */ | |
| $(document).ready(function() { |
| function PlaceholderImage({ | |
| height, | |
| width, | |
| ...consumerProps | |
| }) { | |
| return ( | |
| <img | |
| {...consumerProps} | |
| alt="" | |
| src={`https://via.placeholder.com/${width}x${height}`} |
and star this gist!
| module.exports = { | |
| // forcing the creation of an index.html for every page to allow | |
| // providers serving pages without having to add .html to the url | |
| exportPathMap: async function (defaultPathMap) { | |
| const pathMap = {}; | |
| for (const [path, config] of Object.entries(defaultPathMap)) { | |
| if (path === "/") { | |
| pathMap[path] = config; | |
| } else { |
There are two types of markup in Liquid: Output and Tag.
{{ matched pairs of curly brackets (ie, braces) }}| // Remember to install mini-svg-data-uri | |
| // Follow me on twitter for memes @jordienr | |
| import { type Config } from "tailwindcss"; | |
| const { | |
| default: flattenColorPalette, | |
| } = require("tailwindcss/lib/util/flattenColorPalette"); | |
| const svgToDataUri = require("mini-svg-data-uri"); | |
| export default { |
| <?php | |
| use Valet\Drivers\ValetDriver; | |
| class LocalValetDriver extends ValetDriver | |
| { | |
| public function serves(string $sitePath, string $siteName, string $uri): bool | |
| { | |
| return true; | |
| } |
This document provides a comprehensive guide to implementing geospatial queries in Laravel applications. It covers setting up your database, installing necessary packages, defining spatial data in your models, and performing various types of geospatial queries using Laravel's Eloquent ORM and query builder.
Table of Contents:
| <script setup lang="ts"> | |
| import StreamingIndicator from '@/components/StreamingIndicator.vue'; | |
| import { useStream } from '@laravel/stream-vue'; | |
| import { onMounted, onUnmounted, ref, watch } from 'vue'; | |
| type Message = { | |
| type: 'response' | 'error' | 'prompt'; | |
| content: string; | |
| }; | |
| const messages = ref<Message[]>([]); | |
| const { data, send, cancel, isStreaming, id } = useStream('chat'); |