早在 2022 年年初的时候 Cloudflare 就推出了 Email Routing 的服务,在第一时间就从 Google Domains 中迁移到了 Cloudflare,中间好像也没有遇到什么问题,正常的收到域名邮箱的邮件,转发到 Gmail。
Cloudflare Email Routing (beta) is designed to simplify the way you create and manage email addresses, without needing to keep an eye on additional m
Read more ...
在开发环节要测试的时候,如果想要在数据库中批量插入一些假数据,这个时候就可以使用 model factories。
在 database/factories/ 目录下面默认定义了一个 UserFactory.php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class UserFactory extends Factory
{
/**
* Defin
Read more ...
Laravel 使用的 Eloquent ORM 中的 Model 可以用一种非常易读的方式去定义 Model 和 Model 之间的关系。
1 对 1 关系
比如 User 和 Phone 都是一个 Model,要去表示用户和 Phone 的关系,可以:
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
/**
* Get the phone associated with
Read more ...
Google Stitch:AI 驱动的 UI 设计工具让创意快速成为现实
在昨天 2025 年的 Google I/O 大会上 Google 一口气发布了超多的 AI 工具集,其中包括了一款叫做 Stitch 的 AI 工具,它可以快速帮助设计师和开发者将 UI 设计理念变成可实际使用的设计稿,生成设计稿之后可以直接导入到 Figma,或者直接导出成前端代码。所以本文就具体来介绍一下 Stitch。