twkh jl

@twkhjl

Joined on Oct 17, 2019

  • 2025/3/16/更新: laravel 11(第幾版開始不確定) 可下此指令 php artisan lang:publish 會產生lang資料夾. 從9開始,lang路徑跟以前不同.須注意. 新增一個zh_TW/messages.php
     Like  Bookmark
  • 其他 判定jquery有無引用 if (typeof jQuery !== "undefined") { console.log("jQuery version:", jQuery.fn.jquery); } else { console.log("jQuery is not loaded."); } DOM 重設表單內容 https://www.tutorialrepublic.com/faq/how-to-reset-a-form-using-jquery.php
     Like  Bookmark
  • 基本用法 自訂狀態碼 網址範例: http://ur_domain_name/hello // routes/web.php Route::get('/hello',function(){ // return '<h3>hello laravel</h3>'; // return response('hello laravel',404);
     Like  Bookmark
  • READ //method1 $todos= Todo::get(); //method2 $todos = Todo::OrderBy('created_at', 'desc')->get(); //method1 $todo = Todo::find($id); //method2 $todo = Todo::where('id',$id)->first();
     Like  Bookmark
  • 網路教學 再見了 pip!最佳 Python 套件管理器——Poetry 完全入門指南 https://blog.kyomind.tw/python-poetry/ Dictionary check key/value exists in dictionary https://stackoverflow.com/questions/8214932/how-to-check-if-a-value-exists-in-a-dictionary-python d = { 'a':111,
     Like  Bookmark
  • 網路資源 使用vscode開發c# winform https://code.visualstudio.com/docs/languages/dotnet
     Like  Bookmark
  • 網路資源 https://pjchender.dev/typescript/ts-functions/ 環境設定 https://ithelp.ithome.com.tw/articles/10224788 安裝 npm install -g typescript 檢查版本
     Like  Bookmark
  • 參考資料 文章 [FP] Monad 1- 初探篇 Taking Monads to OOP PHP 影片 What is a monad? (Design Pattern) The Absolute Best Intro to Monads For Software Engineers
     Like  Bookmark
  • grid tuts https://www.daconote.com/css-gride-fr/ transform 移除transform .btn:disabled:active{ transform:none; }
     Like  Bookmark
  • 鐵人賽 2022 Angular Material完全攻略 Angular TDD 測試從0到1 今天我想來在 Angular 應用程式上加上測試保護 angular專案開發指南 Angular牙起來 2021 Angular 學徒之路 feat. TypeScript
     Like  Bookmark
  • 參考資料 https://stackoverflow.com/questions/49650422/handle-jwt-auth-errors-in-laravel https://vocus.cc/article/5fa66df2fd897800012414c6 https://www.medianova.com/en-blog/2020/01/17/laravel-api-jwt-examples https://www.positronx.io/laravel-jwt-authentication-tutorial-user-login-signup-api/ 安裝 composer require tymon/jwt-auth "1.0.1"
     Like  Bookmark
  • 參考資料: https://stackoverflow.com/questions/6364289/clear-form-fields-with-jquery https://www.w3schools.com/bootstrap4/bootstrap_modal.asp <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1">
     Like  Bookmark
  • vite+eslint 安裝專案: npm init vue@latest 選擇Add Eslint跟Add prrettier的時候都要選yes 安裝eslint plugin: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
     Like  Bookmark
  • CRUD update 直接根據接收的用戶輸入json去update資料 $category = Category::find($request->input('id')); $fillable = collect($category->getFillable())->toArray(); $formField = $request->only($fillable); $category->update($formField); model scope 範例:自訂搜尋
     Like  Bookmark
  • (應用相關的筆記看這裡) 安裝與設定 https://tailwindcss.com/docs/installation CDN <script src="https://cdn.tailwindcss.com"></script> CLI 需先安裝 node.js
     Like  Bookmark
  • 環境建置 ubuntu系統: 安裝tasksel套件 http://skyroxas.tw/ubuntu-%E4%BD%BF%E7%94%A8-tasksel-%E5%BF%AB%E9%80%9F%E9%85%8D%E7%BD%AElamp%E7%92%B0%E5%A2%83/ https://linuxconfig.org/how-to-install-lamp-ubuntu-18-04-bionic-beaver-linux-apache-mysql-php $ sudo apt-get install tasksel $ sudo tasksel install lamp-server win & mac: 安裝與設定xampp 安裝:
     Like 1 Bookmark
  • 切版&排版 上方navbar,左側sidebar <div class=" bg-green-700 h-[10vh] w-full -z-10 flex pl-4 "> <span class="leading-[10vh] text-white text-2xl font-extrabold">hihi</span> </div>
     Like  Bookmark
  • 移除request的特定input https://stackoverflow.com/questions/35327679/validate-or-remove-for-extra-fields-in-laravel if(!$request->input('img')==null){ $request->request->remove('img'); } (laravel5.8)如何針對不同request回傳不同response https://stackoverflow.com/questions/42815196/how-to-return-different-output-formats-from-the-same-controller-method-in-larave
     Like  Bookmark
  • 取得免費SSL https://it-help.tips/en/apply-lets-encrypt-wildcard-certificate-online-in-windows/ https://www.youtube.com/watch?v=CzbZKrYo7HA The application is free and open-source https://github.com/sverrirs/GetHttpsF... See my blog for more information about the process and the tool https://blog.sverrirs.com/2016/03/win...
     Like  Bookmark
  • CDN jquery https://releases.jquery.com/ <script src="https://code.jquery.com/jquery-3.6.1.min.js"></script> tailwind <script src="https://cdn.tailwindcss.com"></script> font-awesome
     Like  Bookmark