[Laravel] Các dòng code hữu ích trong laravel
View page. Hiển thị lại data trong các ô input khi reload page.
Trình bày các công nghệ CLOUD một cách dễ hiểu.
Để tạo file controller trong laravel chúng ta có thể dùng câu lệnhbạn sẽ để ý sự khác biết của 2 command nhes Links tài liệu tham khảo:https://laravel.com/docs/8.x/controllers#resource-controllers
Case study ở đây là: khi ở page list học sinh thì mới cần load các js liên quan đến datatablesCòn ở bảng chi tiết học sinh thì mình ko cần load js liên quan đến datatables trong PHP hay laravel làm ntn nhỉ? 1) Using if/else 2) yield – section ở cuối file layout…
Nếu code laravel call vào api của slack thì có thể sài:jolicode/slack-php-api: https://jolicode.github.io/slack-php-api Hoặc call thằng vào api của slack.https://api.slack.com/methods/users.list#args
Mình đã rất nhiều lần đau đầu việc tính toán ngày tháng trong laravel.Từ khi biết carbon thì đơn giản hơn nhiều. Bài post này của mình hơi ngáo là iframe trang web của bên Kia. Mục đích cuối cũng là note và tiện để mò lại. https://viblo.asia/p/xu-ly-datetime-de-dang-hon-voi-thu-vien-carbon-trong-laravel-6J3ZgOmWZmB 1 Trang kháchttps://www.itsolutionstuff.com/post/how-to-compare-two-dates-in-laravel-carbonexample.html
https://www.webslesson.info/2016/10/php-ajax-insert-data-in-mysql-by-using-bootstrap-modal.html video: Demo: http://demo.webslesson.info/insert-data-through-bootstrap-modal-by-using-ajax-php/ Nếu modal bị lưu data thì sài cách dưới How to reset the bootstrap modal when it gets closed and open it fresh again? Chỉnh to nhỏ popup thì: Popup to: Popup nhỏ:
Ở ví dụ này sẽ khá hiểu: Đầu tiên bạn có table chứa thông tin Cha và đương nhiên 1 cha có nhiều conBạn thực hiện get dữ liệu của các Cha từ DB lên và mỗi cha sẽ có thông tin các con của họ. Ở đây mình ko dùng quan hệ 1 nhiều…
Read More “[Laravel] Hướng dẫn taọ 1 array từ việc tổng hợp nhiều Array lấy từ DB hay API” »
https://newbedev.com/python-laravel-http-client-response-code-example Ví dụ 1: laravel http request get response Ví Dụ 2: use guzzle http client laravel Ví dụ 3: laravel http client Ví dụ 4: laravel http client
Hướng dẫn fix lỗi ko morris Js hiển thị trên tab của bootstrap. https://stackoverflow.com/questions/40517038/morris-js-chart-not-working-inside-of-a-bootstrap-tab
1) Recheck array is empty or null Link: https://www.geeksforgeeks.org/how-to-check-whether-an-array-is-empty-using-php/ Cách 1: Cách 2 Cách 3: 2) Removing key that has a null value in an array Tiếp theo là phần khác (update Mon 13 Dec 2021) Xoá key và value nếu value bằng null https://stackoverflow.com/questions/4352203/any-php-function-that-will-strip-properties-of-an-object-that-are-null Mình thấy kiểu trên khá hay