Tags » Laravel

Overriding Composer packages at the source level

I think we all have been in that situation where we had to extend some library class but there was something preventing us from doing it the normal way. 833 more words

PHP

[ 筆記 ] Laravel PHP MySQL

目的:比較上個月和下個月 student(s) 上 english_class 的情況。找出上個月有上 english_class,這個月沒有上 english_class 的人。(課程以每個月為單位,且 start_date 為每個月的 1 號)

SQL 如下

-- This month: Oct, last month: Sep

select * from
(select *, count(student_id) as count from student_checkout_english_class…
86 more words
PHP

Postgres Arrays and PHP -Part 1

The other day I found myself designing a database schema for a collection of musicians each of which plays one or more instruments. The result looked something like this. 1,205 more words

PHP

Laravel Routing - Part 3

Ah, Routing, Routing. So many things to do with routes. Let’s talk more about routes:

Named routes.

Laravel lets you add name to the routes, so that you can quickly reuse them in your code. 855 more words

2020

Laravel Routing - Part 2

Continuing from where we left it in part 1 of Routing post. Let’s see how can we manipulate route params.

Remember that we could capture parts of the URL by adding parameters within braces in our route declaration, as such: … 1,001 more words

2020

Laravel Routing - Part 1

Laravel provides a really flexible routing mechanism. Let’s start with a very basic route: A /GET route that returns some text.

Open your web.php file and add the following line: … 835 more words

2020

Simple Contract Example for Laravel 8

I don’t quite fully understand the need for Contracts in Laravel, basically I think they are a specific set of Interfaces related to important Laravel services. 550 more words

2020