Skip to content

Instantly share code, notes, and snippets.

@1isten
1isten / frontend_framework_essentials.md
Last active January 27, 2023 01:52
basic learning path for any frontend (js) framework
  1. template attributes vue, react
  2. template css & style vue, react
  3. template syntax (condition & list rendering) vue, react
  4. element ref vue, react
  5. form, input events & data binding vue, react
  6. component props (top-down) vue, react
  7. component events (bottom-up) vue,
@1isten
1isten / web.php
Last active January 22, 2024 11:36
laravel route serve static
<?php
// Route::get('/', ...
// ...
Route::fallback(function () {
$static = 'static'; // static folder in project root
$static_file = request()->path() === '/' ? base_path($static) : implode(DIRECTORY_SEPARATOR, array_merge(array(base_path($static)), explode('/', request()->path())));
if (is_dir($static_file)) {