api response
{
"data": [
...
],
"links": {
"first": "https://example.com/pagination?page=1",
"last": "https://example.com/pagination?page=10",
api response
{
"data": [
...
],
"links": {
"first": "https://example.com/pagination?page=1",
"last": "https://example.com/pagination?page=10",
kode ini harus di enchance. agar tidak terjadi case seperti ini lagi pada margin import tambahan
grade_mapping = {
"Mega Store": "mega",
"Basic Store": "basic",
"Super Store": "super",
}
This follow the lunar structure code.
First create folder call Pages
and Components
inside App\Http\Livewire
it will become something like this.
App\Http\Livewire\Components
App\Http\Livewire\Pages
Moving on. we will create new Page call Foo
FooIndex
inside Pages
Mix -> Vite
vite
laravel-vite-plugin
vite-plugin-vue2
(for vue2.6) @vitejs/plugin-vue2
(for vue2.7) or @vitejs/plugin-vue
(for vue3)for vue 2.7 https://github.com/vuejs/vue/blob/main/CHANGELOG.md#270-2022-07-01
// Check whether quill content is empty | |
function isQuillEmpty(quill) { | |
if ((quill.getContents()['ops'] || []).length !== 1) { | |
return false | |
} | |
return quill.getText().trim().length === 0 | |
} | |
// Delta to HTML |
<?php | |
use Illuminate\Support\Str; | |
function generateReferralCode($str) { | |
// get random number min & max 4 digit | |
$randomNumber = rand(1000, 9999); | |
// get the first 4 character and trim whitespace | |
$strName = trim(substr($str, 0, 4)); | |
// get str length |
const Example = { | |
data() { | |
return { | |
users: [ | |
{ | |
id: 1, name: 'Aslam', permissions: ['view'] | |
}, | |
{ | |
id: 2, name: 'Jonwik', permissions: [] | |
} |
##…or create a new repository on the command line
echo "# laravel-bank-bni" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Aslam97/laravel-bank-bni.git
git push -u origin main
// Lazy-loads view components, but with better UX. A loading view | |
// will be used if the component takes a while to load, falling | |
// back to a timeout view in case the page fails to load. You can | |
// use this component to lazy-load a route with: | |
// | |
// component: () => lazyLoadView(import('@views/my-view')) | |
// | |
// NOTE: Components loaded with this strategy DO NOT have access | |
// to in-component guards, such as beforeRouteEnter, | |
// beforeRouteUpdate, and beforeRouteLeave. You must either use |
const path = require("path"); | |
const mix = require("laravel-mix"); | |
require("laravel-mix-vue-css-modules"); // https://github.com/Aslam97/laravel-mix-vue-css-modules | |
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') | |
const purgeCss = mix.inProduction() | |
? [ | |
require("@fullhuman/postcss-purgecss")({ | |
content: ["resources/**/*.blade.php", "resources/**/*.vue"], | |
defaultExtractor(content) { |